Skip to content

Commit 0ea54ca

Browse files
authored
Bump to Java version 17 (#158)
* bump to version 17 * newer gradle plugin * jump to agp 8 * more gradle bumping * make ci use java 17 * fix push notification compat * feat: move to java17
1 parent 4f43dcb commit 0ea54ca

File tree

7 files changed

+32
-30
lines changed

7 files changed

+32
-30
lines changed

.github/workflows/lint.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
18+
- uses: actions/setup-java@v3
19+
with:
20+
distribution: 'adopt'
21+
java-version: '17'
1922
- name: Gradle Run ktlint
2023
run: ./gradlew ktlintCheck --continue
2124
- uses: actions/upload-artifact@v2

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/setup-java@v3
2020
with:
2121
distribution: 'adopt'
22-
java-version: '11'
22+
java-version: '17'
2323
- name: Setup Gradle
2424
uses: gradle/gradle-build-action@v2
2525
- name: Validate Gradle Wrapper
@@ -39,8 +39,8 @@ jobs:
3939
- name: Configure JDK
4040
uses: actions/setup-java@v4
4141
with:
42-
distribution: 'zulu'
43-
java-version: 11
42+
distribution: 'adopt'
43+
java-version: '17'
4444
- name: Enable KVM group perms
4545
run: |
4646
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
//}
1010

1111
plugins {
12-
id 'com.android.application' version '7.3.1' apply false
13-
id 'com.android.library' version '7.3.1' apply false
12+
id 'com.android.application' version '8.0.0' apply false
13+
id 'com.android.library' version '8.0.0' apply false
1414
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
1515
id 'io.github.gradle-nexus.publish-plugin' version "1.2.0"
1616
id "org.jetbrains.dokka" version "1.8.10"

example/build.gradle

+11-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext {
3-
lifecycle_version = '2.6.0'
3+
lifecycle_version = '2.7.0'
44
}
55

66
}
@@ -36,34 +36,31 @@ android {
3636
}
3737
}
3838
compileOptions {
39-
sourceCompatibility JavaVersion.VERSION_11
40-
targetCompatibility JavaVersion.VERSION_11
39+
sourceCompatibility JavaVersion.VERSION_17
40+
targetCompatibility JavaVersion.VERSION_17
4141
}
4242
kotlinOptions {
43-
jvmTarget = '11'
43+
jvmTarget = '17'
4444
}
4545
buildFeatures {
4646
viewBinding true
4747
}
48-
configurations {
49-
all*.exclude module: "bcprov-jdk15to18" // Needed for dev.pinkroom.walletconnectkit
50-
}
5148
}
5249

5350
dependencies {
5451
implementation project(':library')
55-
implementation 'androidx.core:core-ktx:1.9.0'
52+
implementation 'androidx.core:core-ktx:1.12.0'
5653
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
5754
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
5855
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
5956
implementation 'androidx.appcompat:appcompat:1.6.1'
60-
implementation 'com.google.android.material:material:1.8.0'
61-
implementation 'com.google.firebase:firebase-messaging:23.1.2'
57+
implementation 'com.google.android.material:material:1.11.0'
58+
implementation 'com.google.firebase:firebase-messaging:23.4.0'
6259
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
63-
implementation 'androidx.fragment:fragment-ktx:1.5.5'
64-
implementation 'androidx.activity:activity-ktx:1.6.1'
60+
implementation 'androidx.fragment:fragment-ktx:1.6.2'
61+
implementation 'androidx.activity:activity-ktx:1.8.2'
6562
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
66-
implementation 'androidx.recyclerview:recyclerview:1.3.0'
63+
implementation 'androidx.recyclerview:recyclerview:1.3.2'
6764
implementation 'org.web3j:crypto:5.0.0'
6865

6966
// WalletConnect V2: core library + WalletConnectModal
@@ -72,7 +69,7 @@ dependencies {
7269
implementation("com.walletconnect:walletconnect-modal")
7370

7471
//Navigation Component
75-
def nav_version = "2.7.5"
72+
def nav_version = "2.7.6"
7673
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
7774
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
7875

gradle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ kotlin.code.style=official
2020
# Enables namespacing of each library's R class so that its R class includes only the
2121
# resources declared in the library itself and none from the library's dependencies,
2222
# thereby reducing the size of the R class for that library
23-
android.nonTransitiveRClass=true
23+
android.nonTransitiveRClass=true
24+
android.defaults.buildfeatures.buildconfig=true
25+
android.nonFinalResIds=false
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Dec 20 09:09:47 PST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

library/build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ ktlint {
2020

2121
android {
2222
namespace 'org.xmtp.android.library'
23-
compileSdk 33
23+
compileSdk 34
2424

2525
defaultConfig {
2626
minSdk 23
27-
targetSdk 33
27+
targetSdk 34
2828

2929
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3030
consumerProguardFiles "consumer-rules.pro"
@@ -37,14 +37,14 @@ android {
3737
}
3838
}
3939
compileOptions {
40-
sourceCompatibility JavaVersion.VERSION_11
41-
targetCompatibility JavaVersion.VERSION_11
40+
sourceCompatibility JavaVersion.VERSION_17
41+
targetCompatibility JavaVersion.VERSION_17
4242
}
4343
testOptions {
4444
animationsDisabled = true
4545
}
4646
kotlinOptions {
47-
jvmTarget = '11'
47+
jvmTarget = '17'
4848
}
4949
publishing {
5050
singleVariant("release") {
@@ -78,19 +78,19 @@ protobuf {
7878
}
7979

8080
dependencies {
81-
implementation 'com.google.crypto.tink:tink-android:1.7.0'
81+
implementation 'com.google.crypto.tink:tink-android:1.8.0'
8282
implementation 'io.grpc:grpc-kotlin-stub:1.3.0'
8383
implementation 'io.grpc:grpc-okhttp:1.51.1'
8484
implementation 'io.grpc:grpc-protobuf-lite:1.51.0'
85-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
85+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
8686
implementation 'org.web3j:crypto:5.0.0'
8787
implementation "net.java.dev.jna:jna:5.13.0@aar"
8888
api 'com.google.protobuf:protobuf-kotlin-lite:3.22.3'
8989
api 'org.xmtp:proto-kotlin:3.40.1'
9090

9191
testImplementation 'junit:junit:4.13.2'
9292
androidTestImplementation 'app.cash.turbine:turbine:0.12.1'
93-
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
93+
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3'
9494
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
9595
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
9696
}

0 commit comments

Comments
 (0)