mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
c1bf46d47f
* chore(deps): bump gradle from 7.1.1 to 7.1.2 Bumps gradle from 7.1.1 to 7.1.2. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): bump lint_version from 30.1.1 to 30.1.2 Bumps `lint_version` from 30.1.1 to 30.1.2. Updates `lint-api` from 30.1.1 to 30.1.2 Updates `lint` from 30.1.1 to 30.1.2 Updates `lint-tests` from 30.1.1 to 30.1.2 --- updated-dependencies: - dependency-name: com.android.tools.lint:lint-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.android.tools.lint:lint-tests dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
64 lines
2.2 KiB
Groovy
64 lines
2.2 KiB
Groovy
import org.gradle.internal.jvm.Jvm
|
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
buildscript {
|
|
// The version for the Kotlin plugin and dependencies
|
|
ext.kotlin_version = '1.6.10'
|
|
ext.lint_version = '30.1.2'
|
|
ext.acra_version = '5.7.0'
|
|
|
|
repositories {
|
|
google()
|
|
maven {
|
|
url "https://plugins.gradle.org/m2/"
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:7.1.2'
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
// in the individual module build.gradle files
|
|
classpath "app.brant:amazonappstorepublisher:0.1.0"
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
classpath "org.jlleitschuh.gradle:ktlint-gradle:10.2.1"
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
|
}
|
|
|
|
ext {
|
|
|
|
jvmVersion = Jvm.current().javaVersion.majorVersion
|
|
if (jvmVersion != "11" && jvmVersion != "14" && jvmVersion != "16") {
|
|
println "\n\n\n"
|
|
println "**************************************************************************************************************"
|
|
println "\n\n\n"
|
|
println "ERROR: AnkiDroid builds with JVM version 11, 14, or 16."
|
|
println " Incompatible major version detected: '" + jvmVersion + "'"
|
|
println "\n\n\n"
|
|
println "**************************************************************************************************************"
|
|
println "\n\n\n"
|
|
System.exit(1)
|
|
}
|
|
ciBuild = System.getenv("CI") == "true" // works for Travis CI or Github Actions
|
|
// allows for -Dpre-dex=false to be set
|
|
preDexEnabled = "true" == System.getProperty("pre-dex", "true")
|
|
// allows for universal APKs to be generated
|
|
universalApkEnabled = "true" == System.getProperty("universal-apk", "false")
|
|
|
|
// Virtualized Environment like CI may report host CPU counts vs guest, but runs 2 cores
|
|
// everyone else gets 50% of cores to account for SMT which doesn't help this workload
|
|
gradleTestMaxParallelForks = 1
|
|
if (!ciBuild) {
|
|
gradleTestMaxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
|
|
}
|
|
}
|
|
|