mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-20 11:08:31 +00:00
Convert build-logic build.gradle to kotlin.
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
val signalBuildToolsVersion by extra("32.0.0")
|
||||
val signalCompileSdkVersion by extra("android-33")
|
||||
val signalTargetSdkVersion by extra(31)
|
||||
val signalMinSdkVersion by extra(21)
|
||||
val signalJavaVersion by extra(JavaVersion.VERSION_11)
|
||||
@@ -1,62 +0,0 @@
|
||||
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
|
||||
}
|
||||
78
build-logic/plugins/src/main/java/signal-library.gradle.kts
Normal file
78
build-logic/plugins/src/main/java/signal-library.gradle.kts
Normal file
@@ -0,0 +1,78 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.gradle.accessors.dm.LibrariesForTestLibs
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.kotlin.dsl.extra
|
||||
|
||||
val libs = the<LibrariesForLibs>()
|
||||
val testLibs = the<LibrariesForTestLibs>()
|
||||
|
||||
val signalBuildToolsVersion: String by extra
|
||||
val signalCompileSdkVersion: String by extra
|
||||
val signalTargetSdkVersion: Int by extra
|
||||
val signalMinSdkVersion: Int by extra
|
||||
val signalJavaVersion: JavaVersion by extra
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("kotlin-android")
|
||||
id("org.jlleitschuh.gradle.ktlint")
|
||||
id("android-constants")
|
||||
}
|
||||
|
||||
android {
|
||||
buildToolsVersion = signalBuildToolsVersion
|
||||
compileSdkVersion = signalCompileSdkVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = signalMinSdkVersion
|
||||
targetSdk = signalTargetSdkVersion
|
||||
multiDexEnabled = true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
sourceCompatibility = signalJavaVersion
|
||||
targetCompatibility = signalJavaVersion
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
|
||||
lint {
|
||||
disable += "InvalidVectorPath"
|
||||
}
|
||||
}
|
||||
|
||||
ktlint {
|
||||
// Use a newer version to resolve https://github.com/JLLeitschuh/ktlint-gradle/issues/507
|
||||
version.set("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)
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.gradle.accessors.dm.LibrariesForTestLibs
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.kotlin.dsl.extra
|
||||
import org.gradle.kotlin.dsl.provideDelegate
|
||||
import org.gradle.kotlin.dsl.the
|
||||
|
||||
val libs = the<LibrariesForLibs>()
|
||||
val testLibs = the<LibrariesForTestLibs>()
|
||||
|
||||
val signalBuildToolsVersion: String by extra
|
||||
val signalCompileSdkVersion: String by extra
|
||||
val signalTargetSdkVersion: Int by extra
|
||||
val signalMinSdkVersion: Int by extra
|
||||
val signalJavaVersion: JavaVersion by extra
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
id("org.jlleitschuh.gradle.ktlint")
|
||||
id("android-constants")
|
||||
}
|
||||
|
||||
android {
|
||||
buildToolsVersion = signalBuildToolsVersion
|
||||
compileSdkVersion = signalCompileSdkVersion
|
||||
|
||||
defaultConfig {
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
minSdk = signalMinSdkVersion
|
||||
targetSdk = signalTargetSdkVersion
|
||||
multiDexEnabled = true
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
sourceCompatibility = signalJavaVersion
|
||||
targetCompatibility = signalJavaVersion
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
|
||||
ktlint {
|
||||
// Use a newer version to resolve https://github.com/JLLeitschuh/ktlint-gradle/issues/507
|
||||
version.set("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