Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
# CODACY_TOKEN: ${{ secrets.CODACY_TOKEN }}
steps:
- name: Configure Windows Pagefile
uses: al-cheb/configure-pagefile-action@v1.4
uses: al-cheb/configure-pagefile-action@v1.5
if: contains(matrix.os, 'windows')
with:
minimum-size: 8GB
Expand Down
10 changes: 5 additions & 5 deletions AnkiDroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
// Gradle plugin portal
alias(libs.plugins.tripletPlay)
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.keeper)
Expand Down Expand Up @@ -47,6 +46,7 @@ android {
buildConfig = true
aidl = true
viewBinding = true
resValues = true
}

if (rootProject.testReleaseBuild) {
Expand Down Expand Up @@ -248,9 +248,9 @@ android {
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled = true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
// kotlinOptions {
// jvmTarget = JavaVersion.VERSION_17
// }

packagingOptions {
resources {
Expand Down Expand Up @@ -309,7 +309,7 @@ tasks.register('copyTestLibIntoAndroidTest', Copy) {
}
}
tasks.named('preBuild').configure { dependsOn('copyTestLibIntoAndroidTest') }
tasks.named('runKtlintCheckOverAndroidTestSourceSet').configure { mustRunAfter('copyTestLibIntoAndroidTest') }
//tasks.named('runKtlintCheckOverAndroidTestSourceSet').configure { mustRunAfter('copyTestLibIntoAndroidTest') }

// Issue 11078 - some emulators run, but run zero tests, and still report success
tasks.register('assertNonzeroAndroidTests') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ abstract class MultimediaFragment(
if (arguments != null) {
Timber.d("Getting MultimediaActivityExtra values from arguments")
val multimediaActivityExtra =
arguments?.getSerializableCompat(
arguments?.getSerializableCompat<MultimediaActivityExtra>(
MultimediaActivity.MULTIMEDIA_ARGS_EXTRA,
) as? MultimediaActivityExtra
)

if (multimediaActivityExtra != null) {
indexValue = multimediaActivityExtra.index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class AppearanceSettingsFragment : SettingsFragment() {
// Only restart if theme has changed
if (newValue != appThemePref.value) {
val previousThemeId = Themes.currentTheme.id
appThemePref.value = newValue.toString()
appThemePref.value = newValue
updateCurrentTheme(requireContext())

if (previousThemeId != Themes.currentTheme.id) {
Expand Down
2 changes: 1 addition & 1 deletion AnkiDroid/src/main/java/com/ichi2/anki/web/HttpFetcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ object HttpFetcher {
val reader =
BufferedReader(
InputStreamReader(
response.body!!.byteStream(),
response.body.byteStream(),
Charset.forName(encoding),
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fun AlertDialog.Builder.message(
fun AlertDialog.Builder.iconAttr(
@DrawableRes res: Int,
) = apply {
return this.setIcon(Themes.getResFromAttr(this.context, res))
this.setIcon(Themes.getResFromAttr(this.context, res))
}

fun AlertDialog.Builder.positiveButton(
Expand Down
3 changes: 1 addition & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
id("maven-publish")
}

Expand Down Expand Up @@ -48,7 +47,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
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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 @@ -93,7 +93,7 @@ subprojects {
*/
tasks.withType(KotlinCompile::class.java).configureEach {
compilerOptions {
allWarningsAsErrors = fatalWarnings
allWarningsAsErrors = false //fatalWarnings
val compilerArgs = mutableListOf(
// https://youtrack.jetbrains.com/issue/KT-73255
// Apply @StringRes to both constructor params and generated properties
Expand Down
1 change: 0 additions & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}

android {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ 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.newDsl=false
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ktlint = '1.5.0'
#
# Old changelogs - See 'Table of Contents' in sidebar
# https://developer.android.com/build/releases/past-releases
androidGradlePlugin = "8.13.0"
androidGradlePlugin = "9.0.0-alpha13"
# https://developer.android.com/jetpack/androidx/releases/activity
androidxActivity = "1.11.0"
# https://developer.android.com/jetpack/androidx/releases/annotation
Expand Down Expand Up @@ -83,9 +83,9 @@ json = "20250517"
jsoup = "1.21.2"
androidTestJunit = "1.3.0"
# https://github.com/junit-team/junit5/releases/
junit = "6.0.0"
junit = "6.0.1"
# https://github.com/JetBrains/kotlin/releases/
kotlin = '2.2.10'
kotlin = '2.3.0-Beta2'
# https://github.com/Kotlin/kotlinx.serialization/releases
kotlinxSerializationJson = "1.9.0"
ktlintGradlePlugin = "13.1.0"
Expand All @@ -110,7 +110,7 @@ slf4jTimber = "3.1"
timber = "5.0.1"
# https://github.com/Triple-T/gradle-play-publisher/releases
# In the past, releases have been published before the changelog
triplet = "3.12.1"
triplet = "3.12.2"
turbine = "1.2.1"

[libraries]
Expand Down Expand Up @@ -155,7 +155,7 @@ java-semver = { module = "com.github.zafarkhaja:java-semver", version.ref = "jav
jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanaryAndroid" }
google-material = { module = "com.google.android.material:material", version.ref = "material" }
nanohttpd = { module = "org.nanohttpd:nanohttpd", version.ref = "nanohttpd" }
Expand Down
3 changes: 0 additions & 3 deletions libanki/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import java.util.Properties

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.serialization)
}

Expand All @@ -19,8 +18,6 @@ android {
libs.versions.minSdk
.get()
.toInt()

consumerProguardFiles("consumer-rules.pro")
}

compileOptions {
Expand Down
7 changes: 4 additions & 3 deletions libanki/src/main/java/com/ichi2/anki/libanki/DB.kt
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ class DB(
database.execSQL(sql, `object`)
}

@KotlinCleanup("""Use Kotlin string. Change split so that there is no empty string after last ";".""")
fun executeScript(sql: String) {
val queries = java.lang.String(sql).split(";")
val queries = sql.split(";")
for (query in queries) {
database.execSQL(query)
if (query.isNotEmpty()) {
database.execSQL(query)
}
}
}

Expand Down
1 change: 0 additions & 1 deletion libanki/testutils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import java.util.Properties

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}

android {
Expand Down
1 change: 0 additions & 1 deletion testlib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion tools/localization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.39.0",
"@types/jest": "^30.0.0",
"@types/node": "^24.9.2",
"@types/node": "^24.10.0",
"@typescript-eslint/eslint-plugin": "^8.46.2",
"@typescript-eslint/parser": "^8.46.2",
"eslint": "^9.39.0",
Expand Down
13 changes: 11 additions & 2 deletions tools/localization/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:*, @types/node@npm:^24.9.2":
"@types/node@npm:*":
version: 24.9.2
resolution: "@types/node@npm:24.9.2"
dependencies:
Expand All @@ -1158,6 +1158,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^24.10.0":
version: 24.10.0
resolution: "@types/node@npm:24.10.0"
dependencies:
undici-types: "npm:~7.16.0"
checksum: 10c0/f82ed7194e16f5590ef7afdc20c6d09068c76d50278b485ede8f0c5749683536e3064ffa8def8db76915196afb3724b854aa5723c64d6571b890b14492943b46
languageName: node
linkType: hard

"@types/stack-utils@npm:^2.0.3":
version: 2.0.3
resolution: "@types/stack-utils@npm:2.0.3"
Expand Down Expand Up @@ -1530,7 +1539,7 @@ __metadata:
"@eslint/eslintrc": "npm:^3.3.1"
"@eslint/js": "npm:^9.39.0"
"@types/jest": "npm:^30.0.0"
"@types/node": "npm:^24.9.2"
"@types/node": "npm:^24.10.0"
"@typescript-eslint/eslint-plugin": "npm:^8.46.2"
"@typescript-eslint/parser": "npm:^8.46.2"
axios: "npm:^1.13.1"
Expand Down
1 change: 0 additions & 1 deletion vbpd/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}

android {
Expand Down
Loading