Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 0133bea

Browse files
committed
Upgrade dependencies; use Java 17
1 parent 5758bee commit 0133bea

File tree

5 files changed

+45
-46
lines changed

5 files changed

+45
-46
lines changed

.github/workflows/build-kdoc.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
with:
12-
submodules: true
1311
- uses: actions/setup-java@v2
1412
with:
1513
distribution: 'temurin'
16-
java-version: 11
14+
java-version: 17
1715
- uses: gradle/gradle-build-action@v2
1816

1917
- name: Build KDoc

.github/workflows/codeql.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,33 +40,25 @@ jobs:
4040
- name: Checkout repository
4141
uses: actions/checkout@v3
4242

43+
- uses: actions/setup-java@v2
44+
with:
45+
distribution: 'temurin'
46+
java-version: 17
47+
- uses: gradle/gradle-build-action@v2
48+
4349
# Initializes the CodeQL tools for scanning.
4450
- name: Initialize CodeQL
4551
uses: github/codeql-action/init@v2
4652
with:
4753
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53-
# queries: security-extended,security-and-quality
54-
5554

5655
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5756
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
60-
61-
# ℹ️ Command-line programs to run using the OS shell.
62-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63-
64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
65-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
57+
#- name: Autobuild
58+
# uses: github/codeql-action/autobuild@v2
6659

67-
# - run: |
68-
# echo "Run, Build Application using script"
69-
# ./location_of_script_within_repo/buildscript.sh
60+
- name: Build
61+
run: ./gradlew --no-daemon assemble
7062

7163
- name: Perform CodeQL Analysis
7264
uses: github/codeql-action/analyze@v2

.github/workflows/test-dev.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v2
9-
with:
10-
submodules: true
119
- uses: actions/setup-java@v2
1210
with:
1311
distribution: 'temurin'
14-
java-version: 11
12+
java-version: 17
1513
- uses: gradle/gradle-build-action@v2
1614

1715
- name: Check
@@ -37,7 +35,7 @@ jobs:
3735
- uses: actions/setup-java@v2
3836
with:
3937
distribution: 'temurin'
40-
java-version: 11
38+
java-version: 17
4139
- uses: gradle/gradle-build-action@v2
4240

4341
- name: Enable KVM group perms

build.gradle

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
buildscript {
66
ext.versions = [
7-
kotlin: '1.7.21',
8-
dokka: '1.7.20',
9-
ical4j: '3.2.10',
7+
kotlin: '1.8.20',
8+
dokka: '1.8.10',
9+
ical4j: '3.2.11',
1010
// latest Apache Commons versions that don't require Java 8 (Android 7)
1111
commonsIO: '2.6'
1212
]
@@ -17,7 +17,7 @@ buildscript {
1717
}
1818

1919
dependencies {
20-
classpath 'com.android.tools.build:gradle:7.3.1'
20+
classpath 'com.android.tools.build:gradle:8.0.0'
2121
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
2222
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
2323
}
@@ -36,44 +36,47 @@ android {
3636
compileSdkVersion 33
3737
buildToolsVersion '33.0.0'
3838

39+
namespace 'at.bitfire.ical4android'
40+
3941
defaultConfig {
4042
minSdkVersion 21 // Android 5.0
41-
targetSdkVersion 32 // Android 12
43+
targetSdkVersion 33 // Android 13
4244

4345
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4446

4547
buildConfigField "String", "version_ical4j", "\"${versions.ical4j}\""
4648
}
4749

48-
namespace 'at.bitfire.ical4android'
49-
5050
compileOptions {
5151
// ical4j >= 3.x uses the Java 8 Time API
5252
coreLibraryDesugaringEnabled true
5353

54-
sourceCompatibility JavaVersion.VERSION_1_8
55-
targetCompatibility JavaVersion.VERSION_1_8
54+
sourceCompatibility JavaVersion.VERSION_17
55+
targetCompatibility JavaVersion.VERSION_17
56+
}
57+
58+
buildFeatures {
59+
buildConfig = true
5660
}
57-
kotlinOptions {
58-
jvmTarget = "1.8"
61+
62+
sourceSets {
63+
main.java.srcDirs = [ "src/main/java", "opentasks-contract/src/main/java" ]
5964
}
65+
6066
packagingOptions {
6167
resources {
6268
excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/*.md']
6369
}
6470
}
71+
6572
lint {
6673
disable 'AllowBackup', 'InvalidPackage'
6774
}
68-
69-
sourceSets {
70-
main.java.srcDirs = [ "src/main/java", "opentasks-contract/src/main/java" ]
71-
}
7275
}
7376

7477
dependencies {
75-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
76-
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6' // 2.0.0 produces "Unsupported desugared library configuration version, please upgrade the D8/R8 compiler."
78+
implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}"
79+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
7780

7881
api("org.mnode.ical4j:ical4j:${versions.ical4j}") {
7982
// exclude modules which are in conflict with system libraries
@@ -85,15 +88,23 @@ dependencies {
8588
}
8689
// ical4j requires newer Apache Commons libraries, which require Java8. Force latest Java7 versions.
8790
// noinspection GradleDependency
88-
api("org.apache.commons:commons-collections4:4.2") { force = true }
91+
api("org.apache.commons:commons-collections4") {
92+
version {
93+
strictly '4.2'
94+
}
95+
}
8996
// noinspection GradleDependency
90-
api("org.apache.commons:commons-lang3:3.8.1") { force = true }
97+
api("org.apache.commons:commons-lang3:3.8.1") {
98+
version {
99+
strictly '3.8.1'
100+
}
101+
}
91102

92103
// noinspection GradleDependency
93104
implementation "commons-io:commons-io:${versions.commonsIO}"
94105

95106
implementation 'org.slf4j:slf4j-jdk14:2.0.3'
96-
implementation 'androidx.core:core-ktx:1.9.0'
107+
implementation 'androidx.core:core-ktx:1.10.0'
97108

98109
androidTestImplementation 'androidx.test:core:1.5.0'
99110
androidTestImplementation 'androidx.test:runner:1.5.2'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)