| plugins { |
| id 'com.android.application' version '8.11.1' |
| id 'com.google.gms.google-services' version '4.4.1' |
| } |
|
|
| repositories { |
| google() |
| mavenCentral() |
| maven { |
| url "https://www.jitpack.io" |
| name 'JitPack Github wrapper' |
| } |
| } |
|
|
| android { |
| dependenciesInfo { |
| |
| includeInApk = false |
| |
| includeInBundle = false |
| } |
| namespace "org.thoughtcrime.securesms" |
| flavorDimensions "none" |
| compileSdk 36 |
|
|
| |
| |
| |
| |
| |
| |
| ndkVersion "27.0.12077973" |
| useLibrary 'org.apache.http.legacy' |
|
|
| defaultConfig { |
| versionCode 30000734 |
| versionName "2.33.1" |
|
|
| applicationId "chat.delta.lite" |
| multiDexEnabled true |
|
|
| minSdkVersion 21 |
| targetSdkVersion 36 |
|
|
| vectorDrawables.useSupportLibrary = true |
|
|
| |
| project.ext.set("archivesBaseName", "deltachat"); |
|
|
| buildConfigField "boolean", "DEV_BUILD", "false" |
|
|
| ndk { |
| if(project.hasProperty("ABI_FILTER")) { |
| abiFilters ABI_FILTER |
| } else { |
| abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| } |
| } |
|
|
|
|
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
|
|
| buildConfigField("String", "TEST_ADDR", buildConfigProperty("TEST_ADDR")) |
| buildConfigField("String", "TEST_MAIL_PW", buildConfigProperty("TEST_MAIL_PW")) |
| buildConfigField("String", "NDK_ARCH", getNdkArch()) |
| } |
|
|
| compileOptions { |
| sourceCompatibility JavaVersion.VERSION_1_8 |
| targetCompatibility JavaVersion.VERSION_1_8 |
| } |
| packagingOptions { |
| jniLibs { |
| doNotStrip '**/*.so' |
| keepDebugSymbols += ['*/mips/*.so', '*/mips64/*.so'] |
| } |
| resources { |
| excludes += ['LICENSE.txt', 'LICENSE', 'NOTICE', 'asm-license.txt', 'META-INF/LICENSE', 'META-INF/NOTICE'] |
| } |
| } |
|
|
|
|
| signingConfigs { |
| debug { |
| |
| if(project.hasProperty("DC_DEBUG_STORE_FILE" )) { |
| storeFile file(DC_DEBUG_STORE_FILE ) |
| } |
| } |
| releaseFdroid { |
| |
| if(project.hasProperty("DC_RELEASE_STORE_FILE")) { |
| storeFile file(DC_RELEASE_STORE_FILE) |
| storePassword DC_RELEASE_STORE_PASSWORD |
| keyAlias DC_RELEASE_KEY_ALIAS_FDROID |
| keyPassword DC_RELEASE_KEY_PASSWORD |
| } |
| } |
| releaseApk { |
| |
| if(project.hasProperty("DC_RELEASE_STORE_FILE")) { |
| storeFile file(DC_RELEASE_STORE_FILE) |
| storePassword DC_RELEASE_STORE_PASSWORD |
| keyAlias DC_RELEASE_KEY_ALIAS_GPLAY |
| keyPassword DC_RELEASE_KEY_PASSWORD |
| } |
| } |
| releaseBundle { |
| if(project.hasProperty("DC_BUNDLE_STORE_FILE")) { |
| storeFile file(DC_BUNDLE_STORE_FILE) |
| storePassword DC_BUNDLE_STORE_PASSWORD |
| keyAlias DC_BUNDLE_KEY_ALIAS |
| keyPassword DC_BUNDLE_STORE_PASSWORD |
| } |
| } |
| } |
|
|
| productFlavors { |
| foss { |
| dimension "none" |
| buildConfigField "boolean", "USE_PLAY_SERVICES", "false" |
| } |
| gplay { |
| dimension "none" |
| apply plugin: "com.google.gms.google-services" |
| buildConfigField "boolean", "USE_PLAY_SERVICES", "true" |
| applicationId "com.github.arcanechat" |
| } |
| } |
|
|
| buildTypes { |
| debug { |
| minifyEnabled true |
| proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| testProguardFiles 'test-proguard-rules.pro' |
| applicationIdSuffix ".beta" |
| } |
| release { |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| minifyEnabled true |
| proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| testProguardFiles 'test-proguard-rules.pro' |
| productFlavors.foss.signingConfig signingConfigs.releaseFdroid |
| productFlavors.gplay.signingConfig signingConfigs.releaseApk |
| } |
| } |
|
|
| if(!project.hasProperty("ABI_FILTER")) { |
| splits { |
| abi { |
| enable true |
| reset() |
| include "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| universalApk true |
| } |
| } |
| } |
|
|
| project.ext.versionCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4] |
|
|
| android.applicationVariants.all { variant -> |
| variant.outputs.all { output -> |
| output.outputFileName = output.outputFileName |
| .replace("android", "ArcaneChat") |
| .replace("-release", "") |
| .replace(".apk", "-${variant.versionName}.apk") |
| if(project.hasProperty("ABI_FILTER")) { |
| output.versionCodeOverride = |
| variant.versionCode * 10 + project.ext.versionCodes.get(ABI_FILTER) |
| } else { |
| output.versionCodeOverride = |
| variant.versionCode * 10 + project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 4) |
| } |
| } |
| } |
|
|
| sourceSets { |
| main { |
| jniLibs.srcDirs = ['libs'] |
| } |
| } |
|
|
| androidResources { |
| generateLocaleConfig true |
| } |
|
|
| lint { |
| abortOnError false |
| } |
| buildFeatures { |
| renderScript true |
| aidl true |
| } |
|
|
| } |
|
|
| final def markwon_version = '4.6.2' |
|
|
| dependencies { |
| |
| implementation "io.noties.markwon:core:$markwon_version" |
| implementation "io.noties.markwon:ext-strikethrough:$markwon_version" |
| implementation "io.noties.markwon:inline-parser:$markwon_version" |
| implementation 'com.airbnb.android:lottie:4.2.2' |
|
|
| implementation 'androidx.concurrent:concurrent-futures:1.3.0' |
| implementation 'androidx.sharetarget:sharetarget:1.2.0' |
| implementation 'androidx.webkit:webkit:1.14.0' |
| implementation 'androidx.multidex:multidex:2.0.1' |
| implementation 'androidx.appcompat:appcompat:1.7.1' |
| implementation 'com.google.android.material:material:1.12.0' |
| implementation 'androidx.legacy:legacy-support-v13:1.0.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.4.1' |
| implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' |
| 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.9.1' |
| implementation 'androidx.emoji2:emoji2-emojipicker:1.5.0' |
| implementation 'com.google.guava:guava:31.1-android' |
| implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1' |
| implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1' |
| implementation 'androidx.constraintlayout:constraintlayout:2.2.0' |
| implementation 'com.google.zxing:core:3.3.0' |
| implementation ('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false } |
| implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.1' |
| implementation 'com.github.Baseflow:PhotoView:2.3.0' |
| implementation 'com.caverock:androidsvg-aar:1.4' |
| implementation 'com.github.bumptech.glide:glide:4.16.0' |
| annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0' |
| annotationProcessor 'androidx.annotation:annotation:1.9.1' |
| implementation 'com.makeramen:roundedimageview:2.3.0' |
| implementation 'com.github.amulyakhare:TextDrawable:558677ea31' |
| |
| implementation 'com.googlecode.mp4parser:isoparser:1.0.6' |
| implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.10.0') { |
| exclude group: 'com.android.support', module: 'support-annotations' |
| } |
|
|
| |
| |
| |
| implementation 'de.cketti.safecontentresolver:safe-content-resolver-v21:1.0.0' |
|
|
| gplayImplementation('com.google.firebase:firebase-messaging:24.1.2') { |
| exclude group: 'com.google.firebase', module: 'firebase-core' |
| exclude group: 'com.google.firebase', module: 'firebase-analytics' |
| exclude group: 'com.google.firebase', module: 'firebase-measurement-connector' |
| } |
|
|
| testImplementation 'junit:junit:4.13.2' |
| testImplementation 'org.assertj:assertj-core:3.27.3' |
| testImplementation 'org.mockito:mockito-core:5.18.0' |
| testImplementation 'org.powermock:powermock-api-mockito:1.7.4' |
| testImplementation 'org.powermock:powermock-module-junit4:2.0.9' |
| testImplementation 'org.powermock:powermock-module-junit4-rule:2.0.9' |
| testImplementation 'org.powermock:powermock-classloading-xstream:2.0.9' |
|
|
| androidTestImplementation 'androidx.test:runner:1.7.0' |
| androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' |
| androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.7.0' |
| androidTestImplementation 'androidx.test:rules:1.7.0' |
| androidTestImplementation 'androidx.test.ext:junit:1.3.0' |
| androidTestImplementation 'com.android.support:support-annotations:28.0.0' |
|
|
| androidTestImplementation ('org.assertj:assertj-core:3.27.3') { |
| exclude group: 'org.hamcrest', module: 'hamcrest-core' |
| } |
| } |
|
|
| String buildConfigProperty(String name) { |
| return "\"${propertyOrEmpty(name)}\"" |
| } |
|
|
| String propertyOrEmpty(String name) { |
| Object p = findProperty(name) |
| if (p == null) return environmentVariable(name) |
| return (String) p |
| } |
|
|
| static String environmentVariable(String name) { |
| String env = System.getenv(name) |
| if (env == null) return "" |
| return env |
| } |
|
|
| String getNdkArch() { |
| Properties properties = new Properties() |
| def file = project.rootProject.file('ndkArch') |
| if (!file.exists()) return "\"\"" |
| properties.load(file.newDataInputStream()) |
| def arch = properties.getProperty('NDK_ARCH') |
| if (arch == null) return "\"\"" |
| return "\"$arch\"" |
| } |
|
|