Skip to content

Commit

Permalink
Bump to Java version 17 (#158)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nplasterer authored Feb 5, 2024
1 parent 4f43dcb commit 0ea54ca
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 30 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Gradle Run ktlint
run: ./gradlew ktlintCheck --continue
- uses: actions/upload-artifact@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Validate Gradle Wrapper
Expand All @@ -39,8 +39,8 @@ jobs:
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
distribution: 'adopt'
java-version: '17'
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
//}

plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'com.android.application' version '8.0.0' apply false
id 'com.android.library' version '8.0.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
id 'io.github.gradle-nexus.publish-plugin' version "1.2.0"
id "org.jetbrains.dokka" version "1.8.10"
Expand Down
25 changes: 11 additions & 14 deletions example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
lifecycle_version = '2.6.0'
lifecycle_version = '2.7.0'
}

}
Expand Down Expand Up @@ -36,34 +36,31 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
buildFeatures {
viewBinding true
}
configurations {
all*.exclude module: "bcprov-jdk15to18" // Needed for dev.pinkroom.walletconnectkit
}
}

dependencies {
implementation project(':library')
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.google.firebase:firebase-messaging:23.1.2'
implementation 'com.google.android.material:material:1.11.0'
implementation 'com.google.firebase:firebase-messaging:23.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.fragment:fragment-ktx:1.5.5'
implementation 'androidx.activity:activity-ktx:1.6.1'
implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'org.web3j:crypto:5.0.0'

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

//Navigation Component
def nav_version = "2.7.5"
def nav_version = "2.7.6"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Dec 20 09:09:47 PST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
16 changes: 8 additions & 8 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ ktlint {

android {
namespace 'org.xmtp.android.library'
compileSdk 33
compileSdk 34

defaultConfig {
minSdk 23
targetSdk 33
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -37,14 +37,14 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
testOptions {
animationsDisabled = true
}
kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
publishing {
singleVariant("release") {
Expand Down Expand Up @@ -78,19 +78,19 @@ protobuf {
}

dependencies {
implementation 'com.google.crypto.tink:tink-android:1.7.0'
implementation 'com.google.crypto.tink:tink-android:1.8.0'
implementation 'io.grpc:grpc-kotlin-stub:1.3.0'
implementation 'io.grpc:grpc-okhttp:1.51.1'
implementation 'io.grpc:grpc-protobuf-lite:1.51.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
implementation 'org.web3j:crypto:5.0.0'
implementation "net.java.dev.jna:jna:5.13.0@aar"
api 'com.google.protobuf:protobuf-kotlin-lite:3.22.3'
api 'org.xmtp:proto-kotlin:3.40.1'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'app.cash.turbine:turbine:0.12.1'
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4'
androidTestImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
Expand Down

0 comments on commit 0ea54ca

Please sign in to comment.