From 90ed5a84dacba82c79fc1b64794f88c3eecc719b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Mon, 15 Jan 2024 15:05:13 -0500 Subject: [PATCH 1/4] upgrade some dependencies (#2838) * upgrade some deps * update .github/workflows/preview-apk.yml --- .github/workflows/preview-apk.yml | 15 ++++++----- build.gradle | 44 ++++++++++++++++--------------- gradle.properties | 5 +++- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/.github/workflows/preview-apk.yml b/.github/workflows/preview-apk.yml index d7f294da9..b838276a7 100644 --- a/.github/workflows/preview-apk.yml +++ b/.github/workflows/preview-apk.yml @@ -11,17 +11,18 @@ jobs: uses: styfle/cancel-workflow-action@0.9.1 with: access_token: ${{ github.token }} - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: working-directory: jni/deltachat-core-rust - - uses: actions/setup-java@v1.4.3 + - uses: actions/setup-java@v3 with: - java-version: 11 - - uses: android-actions/setup-android@v2 - - uses: actions/cache@v2 + java-version: 17 + distribution: 'temurin' + - uses: android-actions/setup-android@v3 + - uses: actions/cache@v3 with: path: | ~/.gradle/caches @@ -48,7 +49,7 @@ jobs: run: ./gradlew --no-daemon assembleGplayDebug - name: Upload APK - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: app-preview.apk path: 'build/outputs/apk/gplay/debug/*.apk' diff --git a/build.gradle b/build.gradle index 67a52f4f6..76324245d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.android.application' version '7.4.2' + id 'com.android.application' version '8.1.4' } repositories { @@ -15,22 +15,22 @@ repositories { dependencies { implementation 'androidx.sharetarget:sharetarget:1.2.0' - implementation 'androidx.webkit:webkit:1.5.0' + implementation 'androidx.webkit:webkit:1.8.0' implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.7.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.10.0' implementation 'androidx.legacy:legacy-support-v13:1.0.0' - implementation ('androidx.preference:preference:1.2.0') { + implementation ('androidx.preference:preference:1.2.1') { exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel' exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel-ktx' } implementation 'androidx.legacy:legacy-preference-v14:1.0.0' - implementation 'androidx.exifinterface:exifinterface:1.3.5' + implementation 'androidx.exifinterface:exifinterface:1.3.6' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - implementation 'androidx.lifecycle:lifecycle-common-java8:2.5.1' - implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' - implementation 'androidx.work:work-runtime:2.7.1' + implementation 'androidx.lifecycle:lifecycle-common-java8:2.6.2' + implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2' + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2' + implementation 'androidx.work:work-runtime:2.8.1' implementation 'com.google.android.exoplayer:exoplayer-core:2.9.6' // plays video and audio implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.6' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' @@ -44,7 +44,7 @@ dependencies { implementation 'com.caverock:androidsvg-aar:1.4' // SVG support. implementation 'com.github.bumptech.glide:glide:4.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' - annotationProcessor 'androidx.annotation:annotation:1.5.0' + annotationProcessor 'androidx.annotation:annotation:1.7.0' implementation 'com.makeramen:roundedimageview:2.1.0' // crops the avatars to circles implementation 'com.pnikosis:materialish-progress:1.5' // used only in the "Progress Wheel" in Share Activity. implementation 'com.soundcloud.android:android-crop:1.0.1@aar' // used for profile and group avatar selection in Android SDK<19 @@ -86,7 +86,7 @@ dependencies { android { namespace "org.thoughtcrime.securesms" flavorDimensions "none" - compileSdkVersion 33 + compileSdk 34 // Set NDK version to strip native libraries. // Even though we compile our libraries outside Gradle with `scripts/ndk-make.sh`, @@ -130,18 +130,16 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - packagingOptions { - exclude 'LICENSE.txt' - exclude 'LICENSE' - exclude 'NOTICE' - exclude 'asm-license.txt' - exclude 'META-INF/LICENSE' - exclude 'META-INF/NOTICE' - doNotStrip '*/mips/*.so' - doNotStrip '*/mips64/*.so' + jniLibs { + keepDebugSymbols += ['*/mips/*.so', '*/mips64/*.so'] + } + resources { + excludes += ['LICENSE.txt', 'LICENSE', 'NOTICE', 'asm-license.txt', 'META-INF/LICENSE', 'META-INF/NOTICE'] + } } + signingConfigs { debug { // add `DC_DEBUG_STORE_FILE=/path/to/debug.keystore` to `~/.gradle/gradle.properties` @@ -216,6 +214,10 @@ android { lint { abortOnError false } + buildFeatures { + renderScript true + aidl true + } } diff --git a/gradle.properties b/gradle.properties index 2510a2d94..f6503cb12 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,6 @@ +android.defaults.buildfeatures.buildconfig=true android.enableJetifier=true +android.nonFinalResIds=false +android.nonTransitiveRClass=false android.useAndroidX=true -org.gradle.jvmargs=-Xmx4608m \ No newline at end of file +org.gradle.jvmargs=-Xmx4608m From b642c0586192b2edd61463930ceb733f3a2d42c3 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 17 Jan 2024 10:12:43 +0000 Subject: [PATCH 2/4] Dockerfile: update to Java 17 and Debian stable It is required by Gradle now. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ef4f19fcf..4255d6ddb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/ubuntu:18.04 +FROM docker.io/debian:12.4 # Install Android Studio requirements # See https://developer.android.com/studio/install#linux @@ -7,7 +7,7 @@ RUN apt-get update -y \ wget \ curl \ unzip \ -openjdk-11-jre \ +openjdk-17-jre \ file \ build-essential \ && rm -rf /var/lib/apt/lists/* From ee67c1d2175a1731b98970d5f60837f3d10b17e3 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 18 Jan 2024 13:57:52 +0100 Subject: [PATCH 3/4] reactions are no longer experimental by the reactions support being added to desktop, ubuntu-touch and iOS, this also ends the experimental time on android :) --- res/xml/preferences_advanced.xml | 5 ----- .../preferences/AdvancedPreferenceFragment.java | 16 ---------------- .../securesms/reactions/AddReactionView.java | 4 ---- 3 files changed, 25 deletions(-) diff --git a/res/xml/preferences_advanced.xml b/res/xml/preferences_advanced.xml index 0e65641a7..50067caa0 100644 --- a/res/xml/preferences_advanced.xml +++ b/res/xml/preferences_advanced.xml @@ -73,11 +73,6 @@ android:key="pref_new_broadcast_list" android:title="@string/broadcast_lists"/> - - { - if ((Boolean)newValue) { - new AlertDialog.Builder(getActivity()) - .setTitle("Thanks for trying out \"Reactions\"!") - .setMessage("• By long tapping a message, you can now add a reaction\n\n" - + "• Do not rely on reactions being seen by all recipients currently: On some platforms they're still in development, also rolling out updates take time\n\n" - + "• If you want to quit the experimental feature, disable it again at \"Settings / Advanced\";" - + " received or already sent reactions are displayed independently of this switch") - .setCancelable(false) - .setPositiveButton(R.string.ok, null) - .show(); - } - return true; - }); - Preference locationStreamingEnabled = this.findPreference("pref_location_streaming_enabled"); locationStreamingEnabled.setOnPreferenceChangeListener((preference, newValue) -> { if ((Boolean)newValue) { diff --git a/src/org/thoughtcrime/securesms/reactions/AddReactionView.java b/src/org/thoughtcrime/securesms/reactions/AddReactionView.java index 123acf076..65c0912ed 100644 --- a/src/org/thoughtcrime/securesms/reactions/AddReactionView.java +++ b/src/org/thoughtcrime/securesms/reactions/AddReactionView.java @@ -59,10 +59,6 @@ public class AddReactionView extends LinearLayout { public void show(DcMsg msgToReactTo, View parentView, AddReactionListener listener) { init(); // init delayed as needed - if (!Prefs.getBooleanPreference(context, "pref_send_reactions", false)) { - return; - } - if ( msgToReactTo.isInfo() || msgToReactTo.getType() == DcMsg.DC_MSG_VIDEOCHAT_INVITATION || !dcContext.getChat(msgToReactTo.getChatId()).canSend()) { From a1cc00a17f26da67bbf510af1c0ab8cf48ca32ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asiel=20D=C3=ADaz=20Ben=C3=ADtez?= Date: Fri, 19 Jan 2024 23:23:17 -0500 Subject: [PATCH 4/4] register to handle i.delta.chat links (#2922) --- AndroidManifest.xml | 8 ++++++++ .../securesms/ConversationListActivity.java | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0bc387466..870b55a73 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -138,6 +138,14 @@ tools:ignore="AppLinkUrlError" /> + + + + + + +