mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-15 22:22:22 +01:00
281 lines
11 KiB
Groovy
281 lines
11 KiB
Groovy
// Top-level build file where you can add configuration options common to all
|
|
// sub-projects/modules.
|
|
buildscript {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.5.1'
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10"
|
|
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.23.3"
|
|
classpath 'com.novoda:bintray-release:0.8.0'
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'org.ajoberstar.grgit' version '4.1.1'
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: "com.diffplug.spotless"
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven { url "https://jitpack.io" }
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven { url "https://jitpack.io" }
|
|
jcenter()
|
|
}
|
|
|
|
configurations {
|
|
playstoreImplementation
|
|
gitImplementation
|
|
implementation.exclude group: 'org.jetbrains' , module:'annotations'
|
|
}
|
|
|
|
dependencies {
|
|
constraints {
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
|
|
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
|
|
}
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
|
|
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
|
|
}
|
|
}
|
|
|
|
implementation "androidx.core:core:1.13.1"
|
|
implementation 'androidx.viewpager:viewpager:1.0.0'
|
|
|
|
playstoreImplementation('com.google.firebase:firebase-messaging:24.0.0') {
|
|
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'
|
|
}
|
|
playstoreImplementation 'com.android.installreferrer:installreferrer:2.2'
|
|
implementation 'org.sufficientlysecure:openpgp-api:10.0'
|
|
implementation('com.theartofdev.edmodo:android-image-cropper:2.8.0') {
|
|
exclude group: 'com.android.support', module: 'appcompat-v7'
|
|
exclude group: 'com.android.support', module: 'exifinterface'
|
|
}
|
|
implementation 'im.conversations.webrtc:webrtc-android:119.0.1'
|
|
implementation 'org.jitsi:org.otr4j:0.23'
|
|
implementation 'org.bouncycastle:bcmail-jdk18on:1.78.1'
|
|
implementation 'org.gnu.inet:libidn:1.15'
|
|
implementation 'com.google.zxing:core:3.5.0'
|
|
implementation 'org.minidns:minidns-hla:1.0.5'
|
|
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
|
|
implementation 'org.whispersystems:signal-protocol-android:2.6.2'
|
|
implementation 'jetty:javax.servlet:5.1.12'
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
|
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
|
implementation 'androidx.appcompat:appcompat:1.7.0'
|
|
implementation 'androidx.exifinterface:exifinterface:1.3.7'
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
implementation 'androidx.emoji2:emoji2:1.4.0'
|
|
gitImplementation "androidx.emoji2:emoji2-bundled:1.4.0"
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
|
implementation 'com.google.android.material:material:1.12.0'
|
|
implementation 'androidx.cardview:cardview:1.0.0' // for compatibility
|
|
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
|
|
implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1'
|
|
implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1'
|
|
implementation 'com.google.android.exoplayer:extension-mediasession:2.19.1'
|
|
implementation 'pub.devrel:easypermissions:3.0.0' // version >= 3.0.0 needs android X libraries
|
|
implementation 'com.wefika:flowlayout:0.4.1'
|
|
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3'
|
|
implementation 'org.jxmpp:jxmpp-jid:1.0.3'
|
|
implementation 'org.hsluv:hsluv:0.2'
|
|
implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:2.4.2'
|
|
implementation 'org.conscrypt:conscrypt-android:2.5.2'
|
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
|
|
implementation 'me.drakeet.support:toastcompat:1.1.0'
|
|
implementation 'org.osmdroid:osmdroid-android:6.1.16'
|
|
implementation 'com.leinardi.android:speed-dial:3.3.0'
|
|
implementation "com.squareup.okhttp3:okhttp:4.12.0"
|
|
implementation 'com.squareup.retrofit2:retrofit:2.11.0'
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.11.0'
|
|
implementation 'com.google.guava:guava:32.1.3-android'
|
|
implementation 'com.github.AppIntro:AppIntro:6.2.0'
|
|
implementation 'androidx.browser:browser:1.8.0'
|
|
implementation 'com.otaliastudios:transcoder:0.9.1' // 0.10.4 seems to be buggy
|
|
implementation 'com.github.singpolyma:Better-Link-Movement-Method:4df081e1e4'
|
|
implementation project(':libs:AXML')
|
|
implementation 'com.github.ipld:java-cid:v1.3.1'
|
|
implementation 'com.github.woltapp:blurhash:master'
|
|
implementation 'org.tomlj:tomlj:1.1.0'
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
|
|
implementation 'io.michaelrocks:libphonenumber-android:8.13.28'
|
|
implementation 'io.github.nishkarsh:android-permissions:2.1.6'
|
|
implementation 'com.github.singpolyma:TokenAutoComplete:bfa93780e0'
|
|
implementation 'com.github.singpolyma:android-identicons:3361281bd4'
|
|
implementation 'com.github.woltapp:blurhash:master'
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
|
implementation 'org.tomlj:tomlj:1.1.0'
|
|
implementation 'org.jxmpp:jxmpp-stringprep-libidn:1.0.3'
|
|
implementation 'com.tbuonomo:dotsindicator:4.2'
|
|
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
|
implementation 'com.nineoldandroids:library:2.4.0'
|
|
implementation "androidx.core:core-ktx:1.13.1"
|
|
implementation "androidx.compose.material3:material3-android:1.2.1"
|
|
implementation "androidx.emoji2:emoji2-emojipicker:1.4.0"
|
|
implementation 'com.github.Priyansh-Kedia:OpenGraphParser:2.5.6'
|
|
implementation 'com.github.p32929:AndroidAppLockscreen:1.2'
|
|
implementation 'com.github.bumptech.glide:glide:4.16.0'
|
|
}
|
|
|
|
ext {
|
|
preDexEnabled = System.getProperty("pre-dex", "true")
|
|
abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
|
|
}
|
|
|
|
|
|
|
|
def tags = grgit.tag.list().findAll { it.dateTime != null }.sort { it.dateTime }
|
|
|
|
android {
|
|
namespace 'eu.siacs.conversations'
|
|
//noinspection GradleCompatible
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
minSdkVersion 23
|
|
targetSdkVersion 34
|
|
|
|
// versionNameSuffix " -beta_(2023-10-26)" // " beta_(XXXX-XX-XX)" // activate for beta versions
|
|
versionCode 173
|
|
versionName "1.7.10"
|
|
//resConfigs "en"
|
|
|
|
archivesBaseName += "-$versionName"
|
|
// archivesBaseName += "$versionNameSuffix" // activate for beta versions
|
|
applicationId "de.monocles.chat"
|
|
multiDexEnabled true
|
|
//versionName grgit.describe(always: true)
|
|
buildConfigField("String", "LOGTAG", '"monocles chat"')
|
|
buildConfigField("String", "DOMAIN_LOCK", 'null')
|
|
buildConfigField("String", "MAGIC_CREATE_DOMAIN", '"monocles.eu"')
|
|
buildConfigField("boolean", "SHOW_INTRO", 'true')
|
|
buildConfigField("String", "UPDATE_URL", '"https://monocles.eu/chat/update/"')
|
|
resValue "string", "applicationId", applicationId
|
|
resValue "string", "app_name", "monocles chat"
|
|
resValue "string", "short_app_name", "chat"
|
|
}
|
|
splits {
|
|
abi {
|
|
universalApk true
|
|
enable true
|
|
reset()
|
|
include project.ext.abiCodes.keySet() as String[]
|
|
}
|
|
}
|
|
dataBinding {
|
|
enabled true
|
|
}
|
|
|
|
packagingOptions {
|
|
resources {
|
|
excludes += ['META-INF/BCKEY.DSA', 'META-INF/BCKEY.SF', 'META-INF/versions/9/OSGI-INF/MANIFEST.MF']
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
coreLibraryDesugaringEnabled true
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
|
|
flavorDimensions("distribution")
|
|
|
|
productFlavors {
|
|
playstore {
|
|
dimension "distribution"
|
|
versionNameSuffix "-playstore"
|
|
applicationId "de.monocles.chat"
|
|
buildConfigField("boolean", "SHOW_MIGRATION_INFO", 'false')
|
|
resValue "string", "applicationId", applicationId
|
|
}
|
|
git {
|
|
dimension "distribution"
|
|
buildConfigField("boolean", "SHOW_MIGRATION_INFO", 'true')
|
|
}
|
|
}
|
|
if (project.hasProperty('mStoreFile') &&
|
|
project.hasProperty('mStorePassword') &&
|
|
project.hasProperty('mKeyAlias') &&
|
|
project.hasProperty('mKeyPassword')) {
|
|
signingConfigs {
|
|
release {
|
|
storeFile file(mStoreFile)
|
|
storePassword mStorePassword
|
|
keyAlias mKeyAlias
|
|
keyPassword mKeyPassword
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
debuggable false
|
|
signingConfig = signingConfigs.release
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
runProguard true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
|
|
debug {
|
|
debuggable true
|
|
signingConfig null
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
runProguard true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
|
|
afterEvaluate {
|
|
if (getPlugins().hasPlugin('android') ||
|
|
getPlugins().hasPlugin('android-library')) {
|
|
|
|
configure(android.lintOptions) {
|
|
disable 'AndroidGradlePluginVersion', 'MissingTranslation'
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
lint {
|
|
abortOnError false
|
|
checkReleaseBuilds true
|
|
disable 'ExtraTranslation', 'MissingTranslation', 'InvalidPackage', 'MissingQuantity', 'AppCompatResource', 'RestrictedApi'
|
|
error 'StringFormatInvalid', 'StringFormatMatches'
|
|
}
|
|
buildFeatures {
|
|
buildConfig true
|
|
viewBinding true
|
|
}
|
|
android.applicationVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
|
|
if (baseAbiVersionCode != null) {
|
|
output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + baseAbiVersionCode
|
|
} else {
|
|
//output.versionCodeOverride = (100 * project.android.defaultConfig.versionCode) + grgit.log(includes: ["HEAD"], excludes: [tags.last()]).size()
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|