2023-06-20 14:49:00 -04:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
2020-12-03 13:19:03 -05:00
|
|
|
buildscript {
|
2023-06-20 14:49:00 -04:00
|
|
|
ext.kotlin_version = '1.8.10'
|
2020-12-03 13:19:03 -05:00
|
|
|
repositories {
|
|
|
|
google()
|
|
|
|
mavenCentral()
|
|
|
|
jcenter {
|
|
|
|
content {
|
|
|
|
includeVersion 'org.jetbrains.trove4j', 'trove4j', '20160824'
|
|
|
|
includeGroupByRegex "com\\.archinamon.*"
|
|
|
|
}
|
|
|
|
}
|
2021-04-13 17:12:54 -04:00
|
|
|
maven {
|
|
|
|
url "https://plugins.gradle.org/m2/"
|
|
|
|
content {
|
|
|
|
includeGroupByRegex "org\\.jlleitschuh\\.gradle.*"
|
|
|
|
}
|
|
|
|
}
|
2020-12-03 13:19:03 -05:00
|
|
|
}
|
|
|
|
dependencies {
|
2023-06-30 11:21:03 -03:00
|
|
|
classpath 'com.android.tools.build:gradle:8.0.2'
|
2023-03-08 12:12:58 -04:00
|
|
|
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3'
|
2023-06-20 14:49:00 -04:00
|
|
|
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.0'
|
2021-04-13 17:12:54 -04:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
2023-02-27 19:44:51 -05:00
|
|
|
classpath libs.ktlint
|
2021-06-24 13:52:54 -03:00
|
|
|
classpath 'app.cash.exhaustive:exhaustive-gradle:0.1.1'
|
2023-02-02 10:10:00 -05:00
|
|
|
classpath ('com.squareup.wire:wire-gradle-plugin:4.4.3') {
|
|
|
|
exclude group: 'com.squareup.wire', module: 'wire-swift-generator'
|
|
|
|
exclude group: 'com.squareup.wire', module: 'wire-grpc-client'
|
|
|
|
exclude group: 'com.squareup.wire', module: 'wire-grpc-jvm'
|
|
|
|
exclude group: 'com.squareup.wire', module: 'wire-grpc-server-generator'
|
|
|
|
exclude group: 'io.outfoxx', module: 'swiftpoet'
|
|
|
|
}
|
2023-04-06 10:04:37 -04:00
|
|
|
classpath 'androidx.benchmark:benchmark-gradle-plugin:1.1.0-beta04'
|
2023-09-18 15:32:43 -04:00
|
|
|
classpath files("$rootDir/wire-handler/wire-handler-1.0.0.jar")
|
2020-12-03 13:19:03 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-20 12:33:57 -05:00
|
|
|
wrapper {
|
|
|
|
distributionType = Wrapper.DistributionType.ALL
|
|
|
|
}
|
2019-11-20 13:16:10 -05:00
|
|
|
|
2023-08-16 15:29:45 -03:00
|
|
|
apply from: "${rootDir}/constants.gradle.kts"
|
|
|
|
|
2023-06-20 14:49:00 -04:00
|
|
|
allprojects {
|
|
|
|
// Needed because otherwise the kapt task defaults to jvmTarget 17, which "poisons the well" and requires us to bump up too
|
|
|
|
tasks.withType(KotlinCompile).configureEach {
|
|
|
|
kotlinOptions {
|
2023-08-16 15:29:45 -03:00
|
|
|
jvmTarget = signalKotlinJvmTarget
|
2023-06-20 14:49:00 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-20 13:16:10 -05:00
|
|
|
subprojects {
|
|
|
|
ext.lib_signal_service_version_number = "2.15.3"
|
|
|
|
ext.lib_signal_service_group_info = "org.whispersystems"
|
2020-11-12 14:29:06 -05:00
|
|
|
ext.lib_signal_client_version = "0.1.0"
|
2019-11-20 13:16:10 -05:00
|
|
|
|
|
|
|
if (JavaVersion.current().isJava8Compatible()) {
|
|
|
|
allprojects {
|
|
|
|
tasks.withType(Javadoc) {
|
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-02-24 15:07:56 -05:00
|
|
|
|
2023-03-09 14:27:03 -05:00
|
|
|
if (project.name != "Signal-Android" && project.name != "libsignal-service" && project.name != "lintchecks" && !project.name.endsWith("-app") && project.name != "benchmark") {
|
2021-02-24 15:07:56 -05:00
|
|
|
task qa {
|
|
|
|
group 'Verification'
|
|
|
|
description 'Quality Assurance. Run before pushing'
|
2022-02-08 12:01:44 -05:00
|
|
|
dependsOn 'clean', 'testReleaseUnitTest', 'lintRelease'
|
2021-02-24 15:07:56 -05:00
|
|
|
}
|
|
|
|
}
|
2019-11-20 13:16:10 -05:00
|
|
|
}
|
|
|
|
|
2023-03-03 13:26:42 -04:00
|
|
|
task buildQa {
|
|
|
|
group 'Verification'
|
|
|
|
description 'Quality Assurance for build logic.'
|
|
|
|
dependsOn gradle.includedBuild('build-logic').task(':tools:test'),
|
|
|
|
gradle.includedBuild('build-logic').task(':tools:ktlintCheck'),
|
|
|
|
gradle.includedBuild('build-logic').task(':plugins:ktlintCheck')
|
|
|
|
}
|
|
|
|
|
2019-11-20 13:16:10 -05:00
|
|
|
task qa {
|
|
|
|
group 'Verification'
|
|
|
|
description 'Quality Assurance. Run before pushing.'
|
2022-02-08 12:01:44 -05:00
|
|
|
dependsOn 'clean',
|
2023-03-03 13:26:42 -04:00
|
|
|
'buildQa',
|
2022-02-08 12:01:44 -05:00
|
|
|
':Signal-Android:testPlayProdReleaseUnitTest',
|
2020-11-02 17:31:32 -04:00
|
|
|
':Signal-Android:lintPlayProdRelease',
|
2021-04-13 17:12:54 -04:00
|
|
|
'Signal-Android:ktlintCheck',
|
2019-11-20 13:16:10 -05:00
|
|
|
':libsignal-service:test',
|
2022-12-08 10:28:24 -05:00
|
|
|
':libsignal-service:ktlintCheck',
|
2023-07-11 10:36:00 -04:00
|
|
|
':Signal-Android:assemblePlayProdRelease',
|
|
|
|
':Signal-Android:compilePlayProdInstrumentationAndroidTestSources'
|
2019-11-20 13:16:10 -05:00
|
|
|
}
|
2022-02-08 12:01:44 -05:00
|
|
|
|
|
|
|
task clean(type: Delete) {
|
|
|
|
delete rootProject.buildDir
|
|
|
|
}
|
2023-03-06 10:46:51 -04:00
|
|
|
|
|
|
|
task format {
|
|
|
|
group 'Formatting'
|
|
|
|
description 'Runs the ktlint formatter on all sources in this project and included builds'
|
|
|
|
|
|
|
|
def dependencyList = subprojects.collect {
|
|
|
|
tasks.findByPath(":${it.name}:ktlintFormat")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencyList.removeIf { it == null}
|
|
|
|
dependencyList.add(0, gradle.includedBuild('build-logic').task(':plugins:ktlintFormat'))
|
|
|
|
dependencyList.add(0, gradle.includedBuild('build-logic').task(':tools:ktlintFormat'))
|
|
|
|
|
|
|
|
dependsOn dependencyList
|
|
|
|
}
|