Skip to content

Commit

Permalink
chore: Update AGP
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Mar 15, 2024
1 parent 7965ae4 commit 430782f
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 42 deletions.
54 changes: 20 additions & 34 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (!gradle.startParameter.taskNames.isEmpty()) {
}

def nativeTarget = System.getenv("NATIVE_TARGET")
if (nativeTarget == null) nativeTarget = ""
if (nativeTarget == null) nativeTarget = "arm64-v8a"

android {
compileSdkVersion 33
Expand All @@ -88,6 +88,7 @@ android {
include nativeTarget
universalApk false
} else {
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
universalApk true
}
}
Expand Down Expand Up @@ -220,15 +221,13 @@ android {
sourceSets {

main {
jni.srcDirs = []
assets.srcDirs = ["src/main/assets", "src/emojis/twitter"]
}

debug {
java {
srcDirs "src/main/java", "src/gservcies/java"
}
jni.srcDirs = []
jniLibs {
srcDir "src/main/libs"
}
Expand All @@ -238,7 +237,6 @@ android {
}

releaseNoGcm {
jni.srcDirs = []
jniLibs {
srcDir "src/main/libs"
}
Expand All @@ -248,7 +246,6 @@ android {
java {
srcDirs "src/main/java", "src/gservcies/java"
}
jni.srcDirs = []
jniLibs {
srcDir "src/main/libs"
}
Expand All @@ -257,16 +254,8 @@ android {
}
}

foss {
jni {
srcDirs = ["./jni/"]
}
}

fdroidRelease {
jni {
srcDirs = ["./jni/"]
}
jniLibs.srcDirs = []
}

Expand All @@ -280,7 +269,7 @@ android {
}
}

tasks.all { task ->
tasks.configureEach { task ->
if (((task.name.endsWith("Ndk") || task.name.startsWith("generateJsonModel") || task.name.startsWith("externalNativeBuild"))) && !(task.name.contains("Debug") || task.name.contains("Foss") || task.name.contains("Fdroid"))) {
task.enabled = false
}
Expand All @@ -292,8 +281,8 @@ android {
}
}

applicationVariants.all { variant ->
variant.outputs.all { output ->
applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output ->
String gramName = "PagerGram"
String first = String.format("%s-v%s(%s)", gramName, versionName, versionCode)
String name = outputFileName.replace("TMessagesProj", first)
Expand All @@ -305,18 +294,18 @@ android {

}

def fcmVersion = "23.0.7"
def crashlyticsVersion = "18.2.12"
def fcmVersion = "23.4.1"
def crashlyticsVersion = "18.6.2"
def playCoreVersion = "1.10.3"

dependencies {

implementation "androidx.browser:browser:1.5.0"
implementation 'androidx.fragment:fragment:1.2.0'
implementation "androidx.core:core-ktx:1.9.0"
implementation "androidx.core:core-ktx:1.10.0"
implementation "androidx.palette:palette-ktx:1.0.0"
implementation "androidx.viewpager:viewpager:1.0.0"
implementation "androidx.exifinterface:exifinterface:1.3.6"
implementation "androidx.exifinterface:exifinterface:1.3.7"
implementation "androidx.interpolator:interpolator:1.0.0"
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
implementation "androidx.multidex:multidex:2.0.1"
Expand All @@ -330,10 +319,10 @@ dependencies {
//noinspection GradleDependency
implementation "com.googlecode.mp4parser:isoparser:1.0.6"

implementation "com.google.code.gson:gson:2.8.9"
implementation "com.google.code.gson:gson:2.10"
implementation "org.osmdroid:osmdroid-android:6.1.10"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1"
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.23'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0'

implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.10"
implementation 'com.neovisionaries:nv-websocket-client:2.14'
Expand All @@ -348,9 +337,6 @@ dependencies {

implementation 'com.google.android.gms:play-services-mlkit-subject-segmentation:16.0.0-beta1'

compileOnly 'org.yaml:snakeyaml:1.29'
implementation 'org.yaml:snakeyaml:1.29'

implementation project(":openpgp-api")

compileOnly fileTree("libs")
Expand All @@ -360,10 +346,8 @@ dependencies {
compileOnly "com.google.android.play:core:$playCoreVersion"

implementation 'com.google.android.gms:play-services-vision:20.1.3'
debugImplementation 'com.google.android.gms:play-services-maps:18.1.0'
debugImplementation 'com.google.android.gms:play-services-location:20.0.0'
releaseImplementation 'com.google.android.gms:play-services-maps:18.1.0'
releaseImplementation 'com.google.android.gms:play-services-location:20.0.0'
implementation 'com.google.android.gms:play-services-maps:18.2.0'
implementation 'com.google.android.gms:play-services-location:21.2.0'

debugImplementation "com.google.firebase:firebase-messaging:$fcmVersion"
debugImplementation "com.google.firebase:firebase-crashlytics:$crashlyticsVersion"
Expand All @@ -383,11 +367,11 @@ dependencies {
// add for undo and redo
implementation 'org.lsposed.hiddenapibypass:hiddenapibypass:4.3'
// add splash screen
implementation("androidx.core:core-splashscreen:1.0.0-beta02")
implementation("androidx.core:core-splashscreen:1.0.1")
// add for music tag flac...
implementation 'org:jaudiotagger:2.0.3'
// add for auto translate
implementation 'com.google.mlkit:language-id:17.0.4'
implementation 'com.google.mlkit:language-id:17.0.5'
// add for emoji
implementation 'com.jaredrummler:truetypeparser-light:1.0.0'
}
Expand Down Expand Up @@ -416,8 +400,11 @@ android {
lint {
disable 'MissingTranslation', 'ExtraTranslation', 'BlockedPrivateApi'
}
buildFeatures {
buildConfig true
}

tasks.all { task ->
tasks.configureEach { task ->
if (task.name.startsWith("uploadCrashlyticsMappingFile")) {
task.enabled = false
} else if (task.name.contains("Crashlytics") && task.name.contains("NoGcm")) {
Expand All @@ -426,5 +413,4 @@ android {
task.enabled = false
}
}

}
8 changes: 8 additions & 0 deletions TMessagesProj/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,11 @@
-dontwarn org.osmdroid.**

-keepattributes SourceFile,LineNumberTable

-dontwarn java.beans.**
-dontwarn java.lang.management.**
-dontwarn javax.swing.**
-dontwarn lombok.**
-dontwarn org.slf4j.**
-dontwarn org.w3c.dom.bootstrap.**
-dontwarn sun.net.spi.nameservice.**
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23'
classpath 'com.google.gms:google-services:4.4.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.9.0'
//noinspection GradleDependency
classpath "com.github.triplet.gradle:play-publisher:3.6.0"
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ org.gradle.parallel=true
org.gradle.configureondemand=false
android.useAndroidX=true
android.enableJetifier=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 17 16:55:16 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
9 changes: 6 additions & 3 deletions openpgp-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 31
compileSdk 33

defaultConfig {
// API-Version . minor
minSdkVersion 19
targetSdkVersion 31
targetSdkVersion 33
}

buildToolsVersion '31.0.0'
buildToolsVersion '33.0.1'
lint {
abortOnError false
}
namespace 'org.openintents.openpgp'
buildFeatures {
aidl true
}
}

0 comments on commit 430782f

Please sign in to comment.