From 81b0530163e35a1c5857ec50593deb3ee2c02770 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Tue, 18 May 2021 13:27:51 +1000 Subject: [PATCH] Clean up libsession Gradle file --- app/build.gradle | 10 ++++---- build.gradle | 13 +--------- libsession/build.gradle | 48 ++--------------------------------- libsession/consumer-rules.pro | 0 libsession/proguard-rules.pro | 21 --------------- libsignal/consumer-rules.pro | 0 libsignal/proguard-rules.pro | 21 --------------- 7 files changed, 8 insertions(+), 105 deletions(-) delete mode 100644 libsession/consumer-rules.pro delete mode 100644 libsession/proguard-rules.pro delete mode 100644 libsignal/consumer-rules.pro delete mode 100644 libsignal/proguard-rules.pro diff --git a/app/build.gradle b/app/build.gradle index bcff2dd487..bef4be1b72 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.3' classpath files('libs/gradle-witness.jar') - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" + classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion" classpath "com.google.gms:google-services:4.3.3" } } @@ -124,7 +124,7 @@ dependencies { implementation "com.google.protobuf:protobuf-java:$protobufVersion" implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion" implementation "com.squareup.okhttp3:okhttp:$okhttpVersion" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2" implementation "nl.komponents.kovenant:kovenant:$kovenantVersion" implementation "nl.komponents.kovenant:kovenant-android:$kovenantVersion" @@ -209,8 +209,8 @@ android { versionCode canonicalVersionCode * postFixSize versionName canonicalVersionName - minSdkVersion androidMinSdkVersion - targetSdkVersion androidCompileSdkVersion + minSdkVersion 21 + targetSdkVersion 30 multiDexEnabled = true // Even though we're running API 21+, this is still needed for release builds diff --git a/build.gradle b/build.gradle index 391d1279dc..c77dca85f9 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,6 @@ buildscript { mavenLocal() google() mavenCentral() - jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.1.3' @@ -15,7 +14,6 @@ buildscript { allprojects { repositories { - mavenLocal() maven { url "https://raw.github.com/signalapp/maven/master/photoview/releases/" content { @@ -40,7 +38,7 @@ allprojects { includeGroupByRegex "org\\.signal.*" } } - maven { // textdrawable + maven { url 'https://dl.bintray.com/amulyakhare/maven' content { includeGroupByRegex "com\\.amulyakhare.*" @@ -53,14 +51,5 @@ allprojects { } } google() - jcenter() - maven { url "https://jitpack.io" } - } - - project.ext { - kotlin_version = "1.4.31" - androidBuildToolsVersion = '29.0.3' - androidCompileSdkVersion = 29 // This is also our target SDK. - androidMinSdkVersion = 21 } } \ No newline at end of file diff --git a/libsession/build.gradle b/libsession/build.gradle index 5fc9b4d4bb..6b2c1853b2 100644 --- a/libsession/build.gradle +++ b/libsession/build.gradle @@ -3,42 +3,10 @@ plugins { id 'kotlin-android' } -android { - compileSdkVersion 30 - buildToolsVersion '29.0.3' - - defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = '1.8' - } -} - dependencies { - // Local: implementation project(":libsignal") - // Remote: - implementation 'org.greenrobot:eventbus:3.0.0' implementation "com.goterl.lazycode:lazysodium-android:4.2.0@aar" - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.2.1' @@ -47,30 +15,18 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' implementation 'com.github.bumptech.glide:glide:4.11.0' - implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' - implementation 'com.annimon:stream:1.1.8' implementation 'com.makeramen:roundedimageview:2.1.0' implementation 'com.esotericsoftware:kryo:4.0.1' - - // from libsignal: implementation "com.google.protobuf:protobuf-java:$protobufVersion" - implementation "com.googlecode.libphonenumber:libphonenumber:8.10.7" implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion" - implementation "org.whispersystems:curve25519-java:$curve25519Version" implementation "com.squareup.okhttp3:okhttp:$okhttpVersion" - implementation "org.threeten:threetenbp:1.3.6" - - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2" implementation "nl.komponents.kovenant:kovenant:$kovenantVersion" - testImplementation "junit:junit:3.8.2" testImplementation "org.assertj:assertj-core:1.7.1" testImplementation "org.conscrypt:conscrypt-openjdk-uber:2.0.0" - implementation 'org.greenrobot:eventbus:3.0.0' - } \ No newline at end of file diff --git a/libsession/consumer-rules.pro b/libsession/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libsession/proguard-rules.pro b/libsession/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/libsession/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/libsignal/consumer-rules.pro b/libsignal/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/libsignal/proguard-rules.pro b/libsignal/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/libsignal/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file