mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-20 11:08:31 +00:00
Move common gradle config into convention plugins.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
ext {
|
||||
BUILD_TOOLS_VERSION = '32.0.0'
|
||||
|
||||
COMPILE_SDK_VERSION = 33
|
||||
TARGET_SDK_VERSION = 31
|
||||
MIN_SDK_VERSION = 21
|
||||
|
||||
JAVA_VERSION = JavaVersion.VERSION_1_8
|
||||
}
|
||||
62
build-logic/plugins/src/main/java/signal-library.gradle
Normal file
62
build-logic/plugins/src/main/java/signal-library.gradle
Normal file
@@ -0,0 +1,62 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'org.jlleitschuh.gradle.ktlint'
|
||||
id 'android-constants'
|
||||
}
|
||||
|
||||
android {
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
compileSdkVersion COMPILE_SDK_VERSION
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK_VERSION
|
||||
targetSdkVersion TARGET_SDK_VERSION
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JAVA_VERSION
|
||||
targetCompatibility JAVA_VERSION
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
lint {
|
||||
disable 'InvalidVectorPath'
|
||||
}
|
||||
}
|
||||
|
||||
ktlint {
|
||||
// Use a newer version to resolve https://github.com/JLLeitschuh/ktlint-gradle/issues/507
|
||||
version = "0.47.1"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
lintChecks project(':lintchecks')
|
||||
|
||||
coreLibraryDesugaring libs.android.tools.desugar
|
||||
|
||||
implementation libs.androidx.core.ktx
|
||||
implementation libs.androidx.fragment.ktx
|
||||
implementation libs.androidx.annotation
|
||||
implementation libs.androidx.appcompat
|
||||
implementation libs.rxjava3.rxandroid
|
||||
implementation libs.rxjava3.rxjava
|
||||
implementation libs.rxjava3.rxkotlin
|
||||
implementation libs.androidx.multidex
|
||||
|
||||
implementation libs.kotlin.stdlib.jdk8
|
||||
ktlintRuleset libs.ktlint.twitter.compose
|
||||
|
||||
testImplementation testLibs.junit.junit
|
||||
testImplementation testLibs.mockito.core
|
||||
testImplementation testLibs.mockito.android
|
||||
testImplementation testLibs.mockito.kotlin
|
||||
testImplementation testLibs.robolectric.robolectric
|
||||
testImplementation testLibs.androidx.test.core
|
||||
testImplementation testLibs.androidx.test.core.ktx
|
||||
}
|
||||
65
build-logic/plugins/src/main/java/signal-sample-app.gradle
Normal file
65
build-logic/plugins/src/main/java/signal-sample-app.gradle
Normal file
@@ -0,0 +1,65 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'org.jlleitschuh.gradle.ktlint'
|
||||
id 'android-constants'
|
||||
}
|
||||
|
||||
android {
|
||||
buildToolsVersion BUILD_TOOLS_VERSION
|
||||
compileSdkVersion COMPILE_SDK_VERSION
|
||||
|
||||
defaultConfig {
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
minSdkVersion MIN_SDK_VERSION
|
||||
targetSdkVersion TARGET_SDK_VERSION
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JAVA_VERSION
|
||||
targetCompatibility JAVA_VERSION
|
||||
}
|
||||
}
|
||||
|
||||
ktlint {
|
||||
// Use a newer version to resolve https://github.com/JLLeitschuh/ktlint-gradle/issues/507
|
||||
version = "0.47.1"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring libs.android.tools.desugar
|
||||
|
||||
implementation project(':core-util')
|
||||
|
||||
coreLibraryDesugaring libs.android.tools.desugar
|
||||
|
||||
implementation libs.androidx.core.ktx
|
||||
implementation libs.androidx.fragment.ktx
|
||||
implementation libs.androidx.annotation
|
||||
implementation libs.androidx.appcompat
|
||||
implementation libs.rxjava3.rxandroid
|
||||
implementation libs.rxjava3.rxjava
|
||||
implementation libs.rxjava3.rxkotlin
|
||||
implementation libs.androidx.multidex
|
||||
implementation libs.material.material
|
||||
implementation libs.androidx.constraintlayout
|
||||
|
||||
implementation libs.kotlin.stdlib.jdk8
|
||||
ktlintRuleset libs.ktlint.twitter.compose
|
||||
|
||||
testImplementation testLibs.junit.junit
|
||||
testImplementation testLibs.mockito.core
|
||||
testImplementation testLibs.mockito.android
|
||||
testImplementation testLibs.mockito.kotlin
|
||||
testImplementation testLibs.robolectric.robolectric
|
||||
testImplementation testLibs.androidx.test.core
|
||||
testImplementation testLibs.androidx.test.core.ktx
|
||||
}
|
||||
Reference in New Issue
Block a user