Skip to content

Commit

Permalink
chore: bump dependencies and fix deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Garg committed Sep 8, 2023
1 parent f308f1b commit 43533d2
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 75 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/develop_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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"
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/kotlin/dev/yashgarg/qbit/data/daos/ConfigDao.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface ConfigDao {
@Query("SELECT * FROM configs") fun getConfigs(): Flow<List<ServerConfig>>

@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)
}
12 changes: 7 additions & 5 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BaselineProfileGenerator {

@Test
fun generateBaselineProfile() =
baselineRule.collectBaselineProfile(StartupBenchmark.packageName) {
baselineRule.collect(StartupBenchmark.packageName) {
pressHome()
startActivityAndWait()

Expand Down
8 changes: 5 additions & 3 deletions bonsai-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ dependencies {

afterEvaluate {
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class KotlinCommonPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.tasks.run {
withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}
withType<KotlinCompile>().configureEach {
kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
}

Expand Down
Loading

0 comments on commit 43533d2

Please sign in to comment.