diff --git a/.github/workflows/develop_ci.yml b/.github/workflows/develop_ci.yml index 97d45c2d..7bde3600 100644 --- a/.github/workflows/develop_ci.yml +++ b/.github/workflows/develop_ci.yml @@ -21,13 +21,13 @@ jobs: outputs: any: ${{ steps.changed-files.outputs.any_changed }} steps: - - uses: actions/checkout@v3.5.2 + - uses: actions/checkout@v4.0.0 with: submodules: "recursive" fetch-depth: 0 - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v35.9.2 + uses: tj-actions/changed-files@v39.0.0 with: files: | .github/workflows/develop_ci.yml @@ -42,19 +42,19 @@ jobs: if: needs.file-changes.outputs.any == 'true' steps: - name: Checkout repository - uses: actions/checkout@v3.5.2 + uses: actions/checkout@v4.0.0 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3.11.0 + uses: actions/setup-java@v3.12.0 with: distribution: "zulu" java-version: "17" cache: "gradle" - name: Check codestyle - uses: gradle/gradle-build-action@v2.4.2 + uses: gradle/gradle-build-action@v2.8.0 with: arguments: spotlessCheck gradle-home-cache-cleanup: true @@ -68,7 +68,7 @@ jobs: if: needs.file-changes.outputs.any == 'true' steps: - name: Checkout repository - uses: actions/checkout@v3.5.2 + uses: actions/checkout@v4.0.0 with: fetch-depth: 0 @@ -81,7 +81,7 @@ jobs: echo $ENCODED_STRING | base64 --decode > "${TMP_KEYSTORE_FILE_PATH}"/qbit-key.jks - name: Set up JDK - uses: actions/setup-java@v3.11.0 + uses: actions/setup-java@v3.12.0 with: distribution: "zulu" java-version: "17" @@ -92,7 +92,7 @@ jobs: run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses - name: Build signed APKs - uses: gradle/gradle-build-action@v2.4.2 + uses: gradle/gradle-build-action@v2.8.0 with: arguments: assembleRelease gradle-home-cache-cleanup: true diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index f89e6630..959da8f2 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -13,14 +13,14 @@ jobs: outputs: any: ${{ steps.changed-files.outputs.any_changed }} steps: - - uses: actions/checkout@v3.5.2 + - uses: actions/checkout@v4.0.0 with: submodules: 'recursive' fetch-depth: 0 - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v35.9.2 + uses: tj-actions/changed-files@v39.0.0 with: files: | .github/workflows/pr_ci.yml @@ -41,18 +41,18 @@ jobs: if: needs.file-changes.outputs.any == 'true' steps: - name: Checkout repository - uses: actions/checkout@v3.5.2 + uses: actions/checkout@v4.0.0 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3.11.0 + uses: actions/setup-java@v3.12.0 with: distribution: "zulu" java-version: "17" cache: "gradle" - name: Check codestyle - uses: gradle/gradle-build-action@v2.4.2 + uses: gradle/gradle-build-action@v2.8.0 with: arguments: spotlessCheck gradle-home-cache-cleanup: true @@ -63,18 +63,18 @@ jobs: if: needs.file-changes.outputs.any == 'true' steps: - name: Checkout repository - uses: actions/checkout@v3.5.2 + uses: actions/checkout@v4.0.0 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3.11.0 + uses: actions/setup-java@v3.12.0 with: distribution: "zulu" java-version: "17" cache: "gradle" - name: Run lint on debug variants - uses: gradle/gradle-build-action@v2.4.2 + uses: gradle/gradle-build-action@v2.8.0 with: arguments: lintDebug gradle-home-cache-cleanup: true @@ -88,18 +88,18 @@ jobs: if: needs.file-changes.outputs.any == 'true' steps: - name: Checkout repository - uses: actions/checkout@v3.5.2 + uses: actions/checkout@v4.0.0 with: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v3.11.0 + uses: actions/setup-java@v3.12.0 with: distribution: "zulu" java-version: "17" cache: "gradle" - name: Build debug APKs - uses: gradle/gradle-build-action@v2.4.2 + uses: gradle/gradle-build-action@v2.8.0 with: arguments: assembleDebug gradle-home-cache-cleanup: true diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c10ed03a..c00ad795 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,12 +21,12 @@ plugins { android { namespace = "dev.yashgarg.qbit" - compileSdk = 33 + compileSdk = 34 defaultConfig { applicationId = "dev.yashgarg.qbit" minSdk = 24 - targetSdk = 33 + targetSdk = 34 versionCode = 16 versionName = "v0.2.4-$commitHash" @@ -36,10 +36,12 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } + val isGithubCi = System.getenv("GITHUB_CI") != null if (isGithubCi) { signingConfigs { diff --git a/app/src/main/kotlin/dev/yashgarg/qbit/data/daos/ConfigDao.kt b/app/src/main/kotlin/dev/yashgarg/qbit/data/daos/ConfigDao.kt index 6848af00..1e6112d7 100644 --- a/app/src/main/kotlin/dev/yashgarg/qbit/data/daos/ConfigDao.kt +++ b/app/src/main/kotlin/dev/yashgarg/qbit/data/daos/ConfigDao.kt @@ -12,7 +12,7 @@ interface ConfigDao { @Query("SELECT * FROM configs") fun getConfigs(): Flow> @Query("SELECT * FROM configs WHERE config_id = :index") - suspend fun getConfigAtIndex(index: Int = 0): ServerConfig? + fun getConfigAtIndex(index: Int = 0): ServerConfig? - @Insert(onConflict = OnConflictStrategy.REPLACE) suspend fun addConfig(config: ServerConfig) + @Insert(onConflict = OnConflictStrategy.REPLACE) fun addConfig(config: ServerConfig) } diff --git a/benchmark/build.gradle.kts b/benchmark/build.gradle.kts index 6092712a..241c9514 100644 --- a/benchmark/build.gradle.kts +++ b/benchmark/build.gradle.kts @@ -7,21 +7,23 @@ plugins { android { namespace = "dev.yashgarg.benchmark" - compileSdk = 33 + compileSdk = 34 defaultConfig { - minSdk = 24 - targetSdk = 33 + minSdk = 33 + targetSdk = 34 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" missingDimensionStrategy("app", "nonFree", "free") } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } + buildTypes { // This benchmark buildType is used for benchmarking, and should function like your // release build (for example, with minification on). It"s signed with a debug key diff --git a/benchmark/src/main/java/dev/yashgarg/benchmark/BaselineProfileGenerator.kt b/benchmark/src/main/java/dev/yashgarg/benchmark/BaselineProfileGenerator.kt index ef296f82..899f8915 100644 --- a/benchmark/src/main/java/dev/yashgarg/benchmark/BaselineProfileGenerator.kt +++ b/benchmark/src/main/java/dev/yashgarg/benchmark/BaselineProfileGenerator.kt @@ -13,7 +13,7 @@ class BaselineProfileGenerator { @Test fun generateBaselineProfile() = - baselineRule.collectBaselineProfile(StartupBenchmark.packageName) { + baselineRule.collect(StartupBenchmark.packageName) { pressHome() startActivityAndWait() diff --git a/bonsai-core/build.gradle.kts b/bonsai-core/build.gradle.kts index 6818ddd3..6ed203fb 100644 --- a/bonsai-core/build.gradle.kts +++ b/bonsai-core/build.gradle.kts @@ -7,13 +7,15 @@ plugins { android { namespace = "cafe.adriel.bonsai.core" - compileSdk = 33 + compileSdk = 34 compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } + buildFeatures { compose = true composeOptions { diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 36c78bfd..43bbcd05 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -9,12 +9,12 @@ dependencies { afterEvaluate { tasks.withType().configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() + sourceCompatibility = JavaVersion.VERSION_17.toString() + targetCompatibility = JavaVersion.VERSION_17.toString() } tasks.withType().configureEach { - kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } + kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } } } diff --git a/build-logic/src/main/kotlin/dev/yashgarg/qbit/gradle/KotlinCommonPlugin.kt b/build-logic/src/main/kotlin/dev/yashgarg/qbit/gradle/KotlinCommonPlugin.kt index ef19d63e..f7069bc3 100644 --- a/build-logic/src/main/kotlin/dev/yashgarg/qbit/gradle/KotlinCommonPlugin.kt +++ b/build-logic/src/main/kotlin/dev/yashgarg/qbit/gradle/KotlinCommonPlugin.kt @@ -13,11 +13,11 @@ class KotlinCommonPlugin : Plugin { override fun apply(project: Project) { project.tasks.run { withType().configureEach { - sourceCompatibility = JavaVersion.VERSION_11.toString() - targetCompatibility = JavaVersion.VERSION_11.toString() + sourceCompatibility = JavaVersion.VERSION_17.toString() + targetCompatibility = JavaVersion.VERSION_17.toString() } withType().configureEach { - kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } + kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } } } } diff --git a/build.gradle.kts b/build.gradle.kts index 4adf1590..0d7b442b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,7 +21,7 @@ plugins { id("dev.yashgarg.qbit.kotlin-common") } -val clean by tasks.existing(Delete::class) { delete(rootProject.buildDir) } +val clean by tasks.existing(Delete::class) { delete(rootProject.layout.buildDirectory) } afterEvaluate { tasks.prepareKotlinBuildScriptModel.dependsOn(tasks.copyGitHooks, tasks.installGitHooks) diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 617446f0..16868f17 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -7,13 +7,15 @@ plugins { android { namespace = "dev.yashgarg.qbit.common" - compileSdk = 33 + compileSdk = 34 compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } + lint { baseline = file("lint-baseline.xml") } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 21cced56..41ccb3e1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,33 +1,32 @@ [versions] -axCore = "1.10.1" +axCore = "1.12.0" axAppcompat = "1.6.1" axActivity = "1.7.2" axConstraintlayout = "2.1.4" axDatastore = "1.0.0" -axNavigation = "2.6.0" -axTest = "1.4.0" +axNavigation = "2.7.2" axWork = "2.8.1" binary_compat = "0.13.2" -coroutines = "1.7.1" +coroutines = "1.7.3" googleMaterial = "1.9.0" -agp = "8.2.0-alpha07" +agp = "8.2.0-alpha15" espresso = "3.5.1" -hilt = "2.46.1" +hilt = "2.48" axHilt = "1.0.0" -ktor = "2.3.1" -lifecycle = "2.6.1" -kotlin = "1.8.21" -mockito = "5.3.1" -room = "2.5.1" -spotless = "6.19.0" +ktor = "2.3.4" +lifecycle = "2.6.2" +kotlin = "1.9.10" +mockito = "5.5.0" +room = "2.5.2" +spotless = "6.21.0" uiautomator = "2.2.0" -serialization = "1.5.1" +serialization = "1.6.0" [libraries] androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "axCore" } androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "axActivity" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "axAppcompat" } -androidx-benchmark-junit = "androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha15" +androidx-benchmark-junit = "androidx.benchmark:benchmark-macro-junit4:1.2.0-beta05" androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "axConstraintlayout" } androidx-datastore = { module = "androidx.datastore:datastore-preferences", version.ref = "axDatastore" } androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" @@ -53,14 +52,14 @@ build-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.r coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } coroutines-jdk8 = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8", version.ref = "coroutines" } kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } -coroutines-turbine = { module = "app.cash.turbine:turbine", version = "0.13.0" } +coroutines-turbine = { module = "app.cash.turbine:turbine", version = "1.0.0" } compose-activity = "androidx.activity:activity-compose:1.7.2" -compose-compiler = "androidx.compose.compiler:compiler:1.4.7" -compose-foundation = "androidx.compose.foundation:foundation:1.4.3" -compose-material3 = "androidx.compose.material3:material3:1.1.0" -compose-material-icons = "org.jetbrains.compose.material:material-icons-extended-desktop:1.4.0" -compose-theme-adapter = "com.google.accompanist:accompanist-themeadapter-material3:0.30.1" +compose-compiler = "androidx.compose.compiler:compiler:1.5.3" +compose-foundation = "androidx.compose.foundation:foundation:1.5.1" +compose-material3 = "androidx.compose.material3:material3:1.1.1" +compose-material-icons = "org.jetbrains.compose.material:material-icons-extended-desktop:1.5.1" +compose-theme-adapter = "com.google.accompanist:accompanist-themeadapter-material3:0.32.0" google-material = { module = "com.google.android.material:material", version.ref = "googleMaterial" } google-dagger-hilt = { module = "com.google.dagger:hilt-android", version.ref = "hilt" } @@ -75,15 +74,15 @@ ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "kto ktor-client-contentNegotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" } ktor-serialization = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } -tools-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.11" -tools-cascade = "me.saket.cascade:cascade:2.0.0" +tools-leakcanary = "com.squareup.leakcanary:leakcanary-android:2.12" +tools-cascade = "me.saket.cascade:cascade:2.2.0" tools-kotlin-result = "com.michael-bull.kotlin-result:kotlin-result:1.1.18" -tools-lottie = "com.airbnb.android:lottie:6.0.1" +tools-lottie = "com.airbnb.android:lottie:6.1.0" tools-whatthestack = "com.github.haroldadmin:WhatTheStack:1.0.0-alpha04" junit = "junit:junit:4.13.2" mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } -mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:5.0.0" +mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:5.1.0" [plugins] android-application = { id = "com.android.application", version.ref = "agp" } @@ -97,7 +96,7 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } navigation-safeargs = { id = "androidx.navigation.safeargs", version.ref = "axNavigation" } spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } -sentry = "io.sentry.android.gradle:3.10.0" +sentry = "io.sentry.android.gradle:3.12.0" [bundles] compose = ["compose-theme-adapter", "compose-activity", "compose-foundation", "compose-material3"] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2c3425d4..7c2c8c24 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionSha256Sum=591855b517fc635b9e04de1d05d5e76ada3f89f5fc76f87978d1b245b4f69225 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index 305afc32..571df021 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -18,7 +18,7 @@ dependencyResolutionManagement { } } -plugins { id("com.gradle.enterprise") version "3.13.3" } +plugins { id("com.gradle.enterprise") version "3.14.1" } gradleEnterprise { buildScan { diff --git a/ui-compose/build.gradle.kts b/ui-compose/build.gradle.kts index 5c317bf1..73945e4a 100644 --- a/ui-compose/build.gradle.kts +++ b/ui-compose/build.gradle.kts @@ -7,13 +7,15 @@ plugins { android { namespace = "dev.yashgarg.qbit.ui.compose" - compileSdk = 33 + compileSdk = 34 compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } + buildFeatures { compose = true composeOptions {