Skip to content

Commit d72265e

Browse files
chore(deps): update dependency gradle to v9 (#347)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 60bf70d commit d72265e

File tree

22 files changed

+53
-90
lines changed

22 files changed

+53
-90
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: android-spotless
22

3-
on:
3+
on:
44
push:
55
branches: [ develop ]
66
pull_request:
@@ -12,16 +12,16 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: set up JDK 17
15+
- name: set up JDK 21
1616
uses: actions/setup-java@v4
1717
with:
18-
java-version: 17
18+
java-version: 21
1919
distribution: 'adopt'
2020
- name: Setup Gradle
2121
uses: gradle/actions/setup-gradle@v4
2222
with:
2323
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
2424
- name: Grant execute permission for gradlew
2525
run: chmod +x gradlew
26-
- name: Run spotless check
26+
- name: Run spotless check
2727
run: ./gradlew spotlessCheck

.github/workflows/android-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: android-test
22

3-
on:
3+
on:
44
push:
55
branches: [ develop ]
66
pull_request:
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- name: set up JDK 17
15+
- name: set up JDK 21
1616
uses: actions/setup-java@v4
1717
with:
18-
java-version: 17
18+
java-version: 21
1919
distribution: 'adopt'
2020
- name: Setup Gradle
2121
uses: gradle/actions/setup-gradle@v4

.github/workflows/gradle-dokka.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- name: set up JDK 17
12+
- name: set up JDK 21
1313
uses: actions/setup-java@v4
1414
with:
15-
java-version: 17
15+
java-version: 21
1616
distribution: 'adopt'
1717
- name: Setup Gradle
1818
uses: gradle/actions/setup-gradle@v4

.github/workflows/version-updater.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: version-updater
12
on:
23
repository_dispatch:
34
types: [version-update-and-push]

.java-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
21.0.8

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ A simple yet comprehensive sql **select** query builder with featuring an annota
44

55
## Why This Project Exists?
66

7-
While [Room](https://developer.android.com/reference/androidx/room/Room) offers an excelent service loader based approach to generate an ORM layer for android application through static annotated queries, if you need to have some form of dynamic queries that might be user generated at runtime you would have to consider using [SupportSQLiteQueryBuilder](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteQueryBuilder) to generate dynamic queries. However the [SupportSQLiteQueryBuilder](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteQueryBuilder) API does a great job of constructing fairly simple queries, but lacks a fluent builder style API with joins, unions and large chains. In addition to this you have to write out table and column names as plain strings which is not only cumbersome but also error prone and adds additional overhead as you'd have to make sure that any changes you make to the entity related names are reflected throughout all your query builder references.
7+
While [Room](https://developer.android.com/reference/androidx/room/Room) offers an excellent service loader based approach to generate an ORM layer for android application through static annotated queries, if you need to have some form of dynamic queries that might be user generated at runtime you would have to consider using [SupportSQLiteQueryBuilder](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteQueryBuilder) to generate dynamic queries. However the [SupportSQLiteQueryBuilder](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteQueryBuilder) API does a great job of constructing fairly simple queries, but lacks a fluent builder style API with joins, unions and large chains. In addition to this you have to write out table and column names as plain strings which is not only cumbersome but also error prone and adds additional overhead as you'd have to make sure that any changes you make to the entity related names are reflected throughout all your query builder references.
88

99
**support-query-builder** aims to solve these problems and comes in the form of 3 libraries with the following features:
1010
- **annotations** - Annotation only which is used to inform the **processor** of entities to inspect
1111
- **core** - The main query builder library for constructing queries
12-
- **core-ext** - Contains helper extention functions for the `core` modules, specifically `asSupportSQLiteQuery`
13-
- **processor** - Kotlin annotation proccessor that generates kotlin object classes that mirror your Room entity annotations supporting inspection `@Entity`, `@ColumnInfo` and `@Embedded`
12+
- **core:ext** - Contains helper extension functions for the `core` modules, specifically `asSupportSQLiteQuery`
13+
- **processor** - Kotlin annotation processor that generates kotlin object classes that mirror your Room entity annotations supporting inspection `@Entity`, `@ColumnInfo` and `@Embedded`
1414

1515

1616
See a list of changes from [releases](https://github.com/AniTrend/support-query-builder/releases)

build.gradle.kts

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import co.anitrend.support.query.builder.buildSrc.plugins.resolver.handleDependencySelection
2-
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
3-
4-
plugins {
5-
id("com.github.ben-manes.versions")
6-
}
7-
81
buildscript {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
gradlePluginPortal()
6+
}
97
dependencies {
108
classpath(libs.android.gradle.plugin)
119
classpath(libs.jetbrains.kotlin.gradle)
@@ -21,24 +19,3 @@ allprojects {
2119
}
2220
}
2321
}
24-
25-
tasks {
26-
val clean by registering(Delete::class) {
27-
delete(rootProject.layout.buildDirectory.get())
28-
}
29-
}
30-
31-
tasks.named(
32-
"dependencyUpdates",
33-
DependencyUpdatesTask::class.java
34-
).configure {
35-
checkForGradleUpdate = false
36-
outputFormatter = "json"
37-
outputDir = "build/dependencyUpdates"
38-
reportfileName = "report"
39-
resolutionStrategy {
40-
componentSelection {
41-
all { handleDependencySelection() }
42-
}
43-
}
44-
}

buildSrc/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ plugins {
77
repositories {
88
google()
99
mavenCentral()
10+
gradlePluginPortal()
1011
maven {
1112
setUrl("https://www.jitpack.io")
1213
}
13-
maven {
14-
setUrl("https://plugins.gradle.org/m2/")
15-
}
1614
}
1715

1816
dependencies {
@@ -25,9 +23,6 @@ dependencies {
2523
/* Depend on the dokka plugin, since we want to access it in our plugin */
2624
implementation(libs.jetbrains.dokka.gradle)
2725

28-
/** Dependency management */
29-
implementation(libs.gradle.versions)
30-
3126
/** Spotless */
3227
implementation(libs.spotless.gradle)
3328

buildSrc/src/main/java/co/anitrend/support/query/builder/buildSrc/module/Modules.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal object Modules {
2222
enum class Common(override val id: String) : Module {
2323
Annotation("annotations"),
2424
Core("core"),
25-
Ext("core-ext"),
25+
Ext("core:ext"),
2626
}
2727
}
2828

buildSrc/src/main/java/co/anitrend/support/query/builder/buildSrc/plugins/components/ProjectConfiguration.kt

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import co.anitrend.support.query.builder.buildSrc.extension.baseExtension
66
import com.android.build.gradle.internal.dsl.DefaultConfig
77
import org.gradle.api.JavaVersion
88
import org.gradle.api.Project
9-
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
9+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
10+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
1011
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
1112
import java.io.File
1213

1314

14-
@Suppress("UnstableApiUsage")
1515
private fun DefaultConfig.applyAdditionalConfiguration(project: Project) {
1616
if (project.isSampleModule()) {
1717
applicationId = "co.anitrend.support.query.builder.sample"
@@ -24,10 +24,10 @@ private fun DefaultConfig.applyAdditionalConfiguration(project: Project) {
2424
}
2525

2626
internal fun Project.configureAndroid(): Unit = baseExtension().run {
27-
compileSdkVersion(34)
27+
compileSdkVersion(35)
2828
defaultConfig {
2929
minSdk = 23
30-
targetSdk = 34
30+
targetSdk = 35
3131
versionCode = props[PropertyTypes.CODE].toInt()
3232
versionName = props[PropertyTypes.VERSION]
3333
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -89,22 +89,20 @@ internal fun Project.configureAndroid(): Unit = baseExtension().run {
8989
}
9090

9191
compileOptions {
92-
sourceCompatibility = JavaVersion.VERSION_17
93-
targetCompatibility = JavaVersion.VERSION_17
92+
sourceCompatibility = JavaVersion.VERSION_21
93+
targetCompatibility = JavaVersion.VERSION_21
9494
}
9595

96-
tasks.withType(KotlinCompile::class.java) {
97-
val compilerArgumentOptions = emptyList<String>()
98-
99-
kotlinOptions {
100-
allWarningsAsErrors = false
101-
freeCompilerArgs = compilerArgumentOptions
96+
tasks.withType(KotlinCompilationTask::class.java) {
97+
compilerOptions {
98+
allWarningsAsErrors.set(false)
99+
freeCompilerArgs.set(emptyList())
102100
}
103101
}
104102

105103
tasks.withType(KotlinJvmCompile::class.java) {
106-
kotlinOptions {
107-
jvmTarget = "17"
104+
compilerOptions {
105+
jvmTarget.set(JvmTarget.JVM_21)
108106
}
109107
}
110108
}

0 commit comments

Comments
 (0)