Clean up app Gradle file

pull/541/head
Niels Andriesse 3 years ago
parent 81b0530163
commit cd1171ba84

@ -1,11 +1,8 @@
buildscript {
ext.kovenant_version = "3.3.0"
repositories {
mavenLocal()
google()
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
@ -26,10 +23,6 @@ apply plugin: 'kotlinx-serialization'
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
exclude group: "org.whispersystems", module: "signal-protocol-java"
exclude group: "org.whispersystems", module: "signal-protocol-android"
exclude group: "org.signal", module: "signal-metadata-java"
exclude group: "org.signal", module: "signal-metadata-android"
exclude module: "commons-logging"
}
@ -54,7 +47,6 @@ dependencies {
implementation 'androidx.fragment:fragment-ktx:1.3.2'
implementation "androidx.core:core-ktx:1.3.2"
implementation "androidx.work:work-runtime-ktx:2.4.0"
implementation ("com.google.firebase:firebase-messaging:18.0.0") {
exclude group: 'com.google.firebase', module: 'firebase-core'
exclude group: 'com.google.firebase', module: 'firebase-analytics'
@ -112,11 +104,8 @@ dependencies {
exclude group: 'com.fasterxml.jackson.core'
exclude group: 'org.freemarker'
}
// Loki
// Local:
implementation project(":libsignal")
implementation project(":libsession")
// Remote:
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1"
implementation "org.whispersystems:curve25519-java:$curve25519Version"
implementation "com.goterl.lazycode:lazysodium-android:4.2.0@aar"
@ -134,7 +123,6 @@ dependencies {
implementation "com.github.tbruyelle:rxpermissions:0.10.2"
implementation "com.github.ybq:Android-SpinKit:1.4.0"
implementation "com.opencsv:opencsv:4.6"
testImplementation 'junit:junit:4.12'
testImplementation 'org.assertj:assertj-core:3.11.1'
testImplementation 'org.mockito:mockito-core:1.10.8'
@ -212,22 +200,15 @@ android {
minSdkVersion 21
targetSdkVersion 30
multiDexEnabled = true // Even though we're running API 21+, this is still needed for release builds
multiDexEnabled = true
vectorDrawables.useSupportLibrary = true
project.ext.set("archivesBaseName", "session")
buildConfigField "long", "BUILD_TIMESTAMP", getLastCommitTimestamp() + "L"
buildConfigField "String", "SIGNAL_URL", "\"\""
buildConfigField "String", "SIGNAL_CDN_URL", "\"\""
buildConfigField "String", "SIGNAL_CONTACT_DISCOVERY_URL", "\"\""
buildConfigField "String", "SIGNAL_SERVICE_STATUS_URL", "\"\""
buildConfigField "String", "CONTENT_PROXY_HOST", "\"contentproxy.signal.org\""
buildConfigField "int", "CONTENT_PROXY_PORT", "443"
buildConfigField "String", "USER_AGENT", "\"OWA\""
buildConfigField "boolean", "DEV_BUILD", "false"
buildConfigField "String", "MRENCLAVE", "\"cd6cfc342937b23b1bdd3bbf9721aa5615ac9ff50a75c5527d441cd3276826c9\""
buildConfigField "String", "UNIDENTIFIED_SENDER_TRUST_ROOT", "\"BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF\""
buildConfigField "String[]", "LANGUAGES", "new String[]{\"" + autoResConfig().collect { s -> s.replace('-r', '_') }.join('", "') + '"}'
buildConfigField "int", "CANONICAL_VERSION_CODE", "$canonicalVersionCode"
@ -237,39 +218,9 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard/proguard-dagger.pro',
'proguard/proguard-jackson.pro',
'proguard/proguard-jna.pro',
'proguard/proguard-sqlite.pro',
'proguard/proguard-appcompat-v7.pro',
'proguard/proguard-square-okhttp.pro',
'proguard/proguard-square-okio.pro',
'proguard/proguard-spongycastle.pro',
'proguard/proguard-rounded-image-view.pro',
'proguard/proguard-glide.pro',
'proguard/proguard-shortcutbadger.pro',
'proguard/proguard-retrofit.pro',
'proguard/proguard-webrtc.pro',
'proguard/proguard-klinker.pro',
'proguard/proguard-retrolambda.pro',
'proguard/proguard-okhttp.pro',
'proguard/proguard-ez-vcard.pro',
'proguard/proguard.pro'
testProguardFiles 'proguard/proguard-automation.pro'
// Uncomment for testing this build type without signing.
// signingConfig signingConfigs.debug
}
debug {
minifyEnabled false
proguardFiles = buildTypes.release.proguardFiles + [
'proguard/proguard-debug.pro'
]
testProguardFiles = buildTypes.release.testProguardFiles
}
}
@ -282,7 +233,7 @@ android {
}
website {
ext.websiteUpdateUrl = "https://updates.signal.org/android"
ext.websiteUpdateUrl = "https://github.com/oxen-io/session-android/releases"
buildConfigField "boolean", "PLAY_STORE_DISABLED", "true"
buildConfigField "String", "NOPLAY_UPDATE_URL", "\"$ext.websiteUpdateUrl\""
}
@ -316,14 +267,8 @@ android {
}
}
def getLastCommitTimestamp() {
static def getLastCommitTimestamp() {
new ByteArrayOutputStream().withStream { os ->
def result = exec {
executable = 'git'
args = ['log', '-1', '--pretty=format:%ct']
standardOutput = os
}
return os.toString() + "000"
}
}
@ -340,9 +285,3 @@ def autoResConfig() {
.collect { matcher -> matcher.group(1) }
.sort()
}
task qa {
group 'Verification'
description 'Quality Assurance. Run before pushing.'
dependsOn ':testPlayReleaseUnitTest', ':lintPlayRelease', ':assemblePlayDebug'
}

Loading…
Cancel
Save