0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00
Anki-Android/build.gradle
dependabot-preview[bot] 85964727d3 Bump gradle from 4.0.0 to 4.0.1
Bumps gradle from 4.0.0 to 4.0.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 17:07:34 -05:00

49 lines
1.9 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 {
repositories {
google()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "app.brant:amazonappstorepublisher:0.1.0"
}
}
ext {
jvmVersion = Jvm.current().javaVersion.majorVersion
if (jvmVersion != "8" && jvmVersion != "11" && jvmVersion != "14") {
println "\n\n\n"
println "**************************************************************************************************************"
println "\n\n\n"
println "ERROR: AnkiDroid builds with JVM LTS and current releases (currently major version 8, 11, or 14)."
println " Incompatible major version detected: '" + jvmVersion + "'"
println "\n\n\n"
println "**************************************************************************************************************"
println "\n\n\n"
System.exit(1)
}
travisBuild = System.getenv("TRAVIS") == "true"
// 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")
// Travis may report host CPU counts vs guest, but runs 2 cores everywhere
// everyone else gets 50% of cores to account for SMT which doesn't help this workload
gradleTestMaxParallelForks = 1
if (!travisBuild) {
gradleTestMaxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
}