Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AnkiDroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,14 @@ android {
buildConfigField "Boolean", "ENABLE_LEAK_CANARY", "true"
}
} else {
testCoverageEnabled true
testCoverageEnabled = true
}

// make the icon red if in debug mode
resValue 'color', 'anki_foreground_icon_color_0', "#FFFF0000"
resValue 'color', 'anki_foreground_icon_color_1', "#FFFF0000"
}
named('release') {
testCoverageEnabled = testReleaseBuild
minifyEnabled System.getenv("MINIFY_ENABLED") ? System.getenv("MINIFY_ENABLED") != "false" : true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
testProguardFile 'proguard-test-rules.pro'
Expand All @@ -167,6 +166,8 @@ android {

resValue 'color', 'anki_foreground_icon_color_0', "#FF29B6F6"
resValue 'color', 'anki_foreground_icon_color_1', "#FF0288D1"
enableUnitTestCoverage = testReleaseBuild
enableAndroidTestCoverage = testReleaseBuild
}
}

Expand Down
4 changes: 2 additions & 2 deletions AnkiDroid/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ tasks.register('jacocoUnitTestReport', JacocoReport) {report ->

gradle.projectsEvaluated {
// ensure test results aren't cached
tasks.named('testPlayDebugUnitTest') {task ->
tasks.matching {it.name == 'testPlayDebugUnitTest'}.configureEach{task ->
task.outputs.upToDateWhen { false }
task.outputs.cacheIf { false }
}
for (module in modulesToUnitTest) {
project(module).tasks.named('testDebugUnitTest')?.configure {task ->
project(module).tasks.matching {it.name == 'testDebugUnitTest'}.configureEach {task ->
task.outputs.upToDateWhen { false }
task.outputs.cacheIf { false }
}
Expand Down
2 changes: 1 addition & 1 deletion api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ android {
}
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (project.rootProject.file("local.properties").exists()) {
val fatalWarnings = localProperties["fatal_warnings"] != "false"

// can't be obtained inside 'subprojects'
val ktlintVersion: String? = libs.versions.ktlint.get()
val ktlintVersion: String = libs.versions.ktlint.get()

// Here we extract per-module "best practices" settings to a single top-level evaluation
subprojects {
Expand All @@ -45,7 +45,7 @@ subprojects {

afterEvaluate {
plugins.withType<com.android.build.gradle.BasePlugin> {
val androidExtension = extensions.getByName("android") as CommonExtension<*, *, *, *, *, *>
val androidExtension = extensions.getByName("android") as CommonExtension
androidExtension.testOptions.unitTests {
isIncludeAndroidResources = true
}
Expand Down Expand Up @@ -113,7 +113,7 @@ subprojects {
}

val jvmVersion = Jvm.current().javaVersion?.majorVersion.parseIntOrDefault(defaultValue = 0)
val minSdk: String? = libs.versions.minSdk.get()
val minSdk: String = libs.versions.minSdk.get()
val jvmVersionLowerBound = 21
val jvmVersionUpperBound = 25
if (jvmVersion !in jvmVersionLowerBound..jvmVersionUpperBound) {
Expand Down
13 changes: 12 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,15 @@ org.gradle.caching=true
org.gradle.configuration-cache.parallel=true

# Enable file system watching (should reduce disk IO and increase incremental build speed).
org.gradle.vfs.watch=true
org.gradle.vfs.watch=true
android.defaults.buildfeatures.resvalues=true
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.enableAppCompileTimeRClass=false
android.usesSdkInManifest.disallowed=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
android.builtInKotlin=false
android.newDsl=false
android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ktlint = '1.8.0'
#
# Old changelogs - See 'Table of Contents' in sidebar
# https://developer.android.com/build/releases/past-releases
androidGradlePlugin = "8.13.2"
androidGradlePlugin = "9.0.1"
# https://developer.android.com/jetpack/androidx/releases/activity
androidxActivity = "1.12.2"
# https://developer.android.com/jetpack/androidx/releases/annotation
Expand Down Expand Up @@ -95,7 +95,7 @@ kotlin = '2.2.10'
kotlinxSerializationJson = "1.9.0"
ktlintGradlePlugin = "14.0.1"
leakcanaryAndroid = "2.14"
lint = '32.0.0'
lint = "32.0.1"
material = "1.13.0"

mockitoInline = "5.2.0"
Expand Down
Empty file added libanki/consumer-rules.pro
Empty file.
Loading