Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jvm 17 #39

Merged
merged 5 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ local.properties
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
/.idea
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
Expand Down
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

41 changes: 0 additions & 41 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/vcs.xml

This file was deleted.

19 changes: 10 additions & 9 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fun String.runCommand(workingDir: File = file("./")): String {
}

val gitCommitHash = "git rev-parse --verify --short HEAD".runCommand()
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystorePropertiesFile: File = rootProject.file("keystore.properties")
val keystoreProperties = Properties()
if (keystorePropertiesFile.exists()) {
println("Loading keystore properties from ${keystorePropertiesFile.absolutePath}")
Expand Down Expand Up @@ -103,18 +103,18 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn"
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all"
}

kotlin {
jvmToolchain(11)
jvmToolchain(17)
}

buildFeatures {
Expand All @@ -126,7 +126,7 @@ android {
kotlinCompilerExtensionVersion = "1.4.3"
}

packagingOptions {
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
Expand Down Expand Up @@ -158,7 +158,7 @@ dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation("androidx.activity:activity-compose:1.7.0")
implementation("androidx.activity:activity-compose:1.7.1")
implementation("androidx.work:work-runtime-ktx:2.8.1")

implementation(libs.compose.ui)
Expand All @@ -175,9 +175,10 @@ dependencies {

implementation("com.google.android.material:material:1.8.0")

implementation("com.google.dagger:hilt-android:2.45")
implementation("androidx.webkit:webkit:1.6.1")
kapt("com.google.dagger:hilt-compiler:2.45")

implementation(libs.hilt.android)
kapt(libs.hilt.compiler)
kapt("androidx.hilt:hilt-compiler:1.0.0")
// https://github.com/google/dagger/issues/2601#issuecomment-1174506373
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
Expand Down
8 changes: 5 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[versions]
# plugin
androidGradlePlugin = "8.0.1"
hilt = "2.44.2"
hilt = "2.46"
kotlin = "1.8.10"
androidxBenchmark = "1.1.1"
androidxCore = "1.9.0"
androidxCore = "1.10.0"

# sdk
compileSdkVersion = "33"
Expand All @@ -18,7 +18,7 @@ appcompat = "1.6.1"
material = "1.8.0"
compose = "1.4.0"
accompanist = "0.30.0"
material3 = "1.1.0-beta01"
material3 = "1.1.0-rc01"
lifecycleRuntime = "2.6.1"

# test
Expand Down Expand Up @@ -51,6 +51,8 @@ accompanist-systemuicontroller = { group = "com.google.accompanist", name = "acc
compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "compose" }
compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "compose" }
compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest", version.ref = "compose" }
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
Expand Down
9 changes: 6 additions & 3 deletions mdrender/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "11"
jvmTarget = JavaVersion.VERSION_17.toString()
// freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn -Xjvm-default=all"
}
kotlin {
jvmToolchain(17)
}
}

dependencies {
Expand Down
10 changes: 6 additions & 4 deletions mdrenderbenchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "11"
jvmTarget = JavaVersion.VERSION_17.toString()
}
kotlin {
jvmToolchain(17)
}

testBuildType = "release"

buildTypes {
Expand Down
9 changes: 6 additions & 3 deletions uniffi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "11"
jvmTarget = JavaVersion.VERSION_17.toString()
}
kotlin {
jvmToolchain(17)
}
}

Expand Down