Skip to content

Commit

Permalink
feat: add JDK 17 build support
Browse files Browse the repository at this point in the history
1. upgrade kotlin to 1.6.0 to support JDK 17
2. upgrade google java format to 1.13.0
3. upgrade kotlin related library version
4. upgrade compile SDK to 31 for new kotlin

Verify on macOS JDK 11 and JDK 17
  • Loading branch information
Bambooin committed Dec 4, 2021
1 parent c3fc3e9 commit 0e5f364
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 30
compileSdkVersion 31
ndkVersion "23.1.7779620"

defaultConfig {
Expand Down Expand Up @@ -89,13 +89,13 @@ dependencies {
implementation 'org.ocpsoft.prettytime:prettytime:5.0.2.Final'
implementation 'com.blankj:utilcodex:1.30.6'
implementation 'com.jakewharton.timber:timber:5.0.1'
implementation "androidx.core:core-ktx:1.3.2"
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.appcompat:appcompat:1.3.0"
implementation "androidx.preference:preference-ktx:1.1.1"
implementation "androidx.fragment:fragment-ktx:1.3.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
implementation "androidx.fragment:fragment-ktx:1.4.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
}
repositories {
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

buildscript {
ext.kotlin_version = '1.5.20'
ext.kotlin_version = '1.6.0'

/**
* The repositories block configures the repositories Gradle uses to
Expand Down Expand Up @@ -59,11 +59,11 @@ spotless {
importOrder()
removeUnusedImports()
target 'app/src/main/java/com/osfans/trime/**/*.java'
googleJavaFormat('1.12.0')
googleJavaFormat('1.13.0')
}
kotlin {
target 'app/src/main/java/com/osfans/trime/**/*.kt'
ktlint("0.42.1")
ktlint("0.43.2")
trimTrailingWhitespace()
indentWithSpaces()
endWithNewline()
Expand Down

0 comments on commit 0e5f364

Please sign in to comment.