113 lines
No EOL
3.9 KiB
Groovy
113 lines
No EOL
3.9 KiB
Groovy
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
buildscript {
|
|
ext.kotlin_version = '1.8.10'
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
jcenter {
|
|
content {
|
|
includeVersion 'org.jetbrains.trove4j', 'trove4j', '20160824'
|
|
includeGroupByRegex "com\\.archinamon.*"
|
|
}
|
|
}
|
|
maven {
|
|
url "https://plugins.gradle.org/m2/"
|
|
content {
|
|
includeGroupByRegex "org\\.jlleitschuh\\.gradle.*"
|
|
}
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.0.2'
|
|
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3'
|
|
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.9.0'
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
classpath libs.ktlint
|
|
classpath 'app.cash.exhaustive:exhaustive-gradle:0.1.1'
|
|
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'
|
|
}
|
|
classpath 'androidx.benchmark:benchmark-gradle-plugin:1.1.0-beta04'
|
|
}
|
|
}
|
|
|
|
wrapper {
|
|
distributionType = Wrapper.DistributionType.ALL
|
|
}
|
|
|
|
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 {
|
|
jvmTarget = "11"
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
ext.lib_signal_service_version_number = "2.15.3"
|
|
ext.lib_signal_service_group_info = "org.whispersystems"
|
|
ext.lib_signal_client_version = "0.1.0"
|
|
|
|
if (JavaVersion.current().isJava8Compatible()) {
|
|
allprojects {
|
|
tasks.withType(Javadoc) {
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
}
|
|
}
|
|
|
|
if (project.name != "Signal-Android" && project.name != "libsignal-service" && project.name != "lintchecks" && !project.name.endsWith("-app") && project.name != "benchmark") {
|
|
task qa {
|
|
group 'Verification'
|
|
description 'Quality Assurance. Run before pushing'
|
|
dependsOn 'clean', 'testReleaseUnitTest', 'lintRelease'
|
|
}
|
|
}
|
|
}
|
|
|
|
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')
|
|
}
|
|
|
|
task qa {
|
|
group 'Verification'
|
|
description 'Quality Assurance. Run before pushing.'
|
|
dependsOn 'clean',
|
|
'buildQa',
|
|
':Signal-Android:testPlayProdReleaseUnitTest',
|
|
':Signal-Android:lintPlayProdRelease',
|
|
'Signal-Android:ktlintCheck',
|
|
':libsignal-service:test',
|
|
':libsignal-service:ktlintCheck',
|
|
':Signal-Android:assemblePlayProdRelease',
|
|
':Signal-Android:compilePlayProdInstrumentationAndroidTestSources'
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
}
|
|
|
|
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
|
|
} |