Skip to content

Commit

Permalink
Migrate to Kotlin 1.9.22 and update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaksymenko committed Jan 15, 2024
1 parent 03be0cb commit aa93854
Show file tree
Hide file tree
Showing 20 changed files with 292 additions and 518 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

Expand All @@ -29,7 +29,7 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: worldwind-tutorials/build/distributions
FOLDER: worldwind-tutorials/build/dist/js/productionExecutable
CLEAN: true
- name: Publish to Maven Central
env:
Expand Down
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
val kotlinVersion = "1.8.22"
val kotlinVersion = "1.9.22"
kotlin("multiplatform") version kotlinVersion apply false
kotlin("plugin.serialization") version kotlinVersion apply false
kotlin("android") version kotlinVersion apply false
id("org.jetbrains.dokka") version "1.8.20" apply false
id("org.jetbrains.dokka") version "1.9.10" apply false
id("com.android.library") apply false
id("com.android.application") apply false
}

buildscript {
dependencies {
classpath("dev.icerock.moko:resources-generator:0.23.0")
classpath("dev.icerock.moko:resources-generator:0.24.0-alpha-1")
}
}

Expand All @@ -22,7 +22,7 @@ allprojects {
set("minSdk", 21)
set("targetSdk", 34)
set("versionCode", 9)
set("javaVersion", JavaVersion.VERSION_1_8)
set("javaVersion", JavaVersion.VERSION_17)
}

repositories {
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ kotlin.code.style=official
kotlin.js.generate.executable.default=false
kotlin.mpp.stability.nowarn=true
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.applyDefaultHierarchyTemplate=false
org.gradle.jvmargs=-Xmx4g
android.useAndroidX=true
android.nonTransitiveRClass=true
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Sun Dec 03 15:48:44 EET 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
730 changes: 238 additions & 492 deletions kotlin-js-store/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "com.android") {
useModule("com.android.tools.build:gradle:7.4.2")
useModule("com.android.tools.build:gradle:8.1.1")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion worldwind-examples-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
dependencies {
implementation(project(":worldwind"))
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("com.google.android.material:material:1.11.0")
implementation("io.github.missioncommand:mil-sym-android-renderer:0.1.54")
Expand Down
19 changes: 15 additions & 4 deletions worldwind-tutorials/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

multiplatformResources {
multiplatformResourcesPackage = "${project.group}.tutorials"
resourcesPackage.set("${project.group}.tutorials")
}

kotlin {
Expand All @@ -21,7 +21,7 @@ kotlin {
}
}
}
android {
androidTarget {
compilations.all {
kotlinOptions.jvmTarget = extra["javaVersion"].toString()
}
Expand All @@ -32,15 +32,26 @@ kotlin {
implementation(project(":worldwind"))
}
}
val jsMain by getting
val jsMain by getting {
dependsOn(commonMain)
}
val androidMain by getting {
dependsOn(commonMain)
dependencies {
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("com.google.android.material:material:1.11.0")
}
}
all {
languageSettings {
@Suppress("OPT_IN_USAGE")
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}
}
}

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
37 changes: 26 additions & 11 deletions worldwind/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

multiplatformResources {
multiplatformResourcesPackage = project.group.toString()
resourcesPackage.set(project.group.toString())
}

kotlin {
Expand All @@ -32,24 +32,24 @@ kotlin {
}
}
}
android {
androidTarget {
publishLibraryVariants("release")
compilations.all {
kotlinOptions.jvmTarget = extra["javaVersion"].toString()
}
}
sourceSets {
val mockkVersion = "1.13.4"
val mokoVersion = "0.23.0"
val ktorVersion = "2.3.4"
val mockkVersion = "1.13.9"
val mokoVersion = "0.24.0-alpha-1"
val ktorVersion = "2.3.7"
val commonMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-datetime:0.4.1")
api("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.github.pdvrieze.xmlutil:serialization:0.86.1")
implementation("com.eygraber:uri-kmp:0.0.12")
implementation("io.github.pdvrieze.xmlutil:serialization:0.86.3")
implementation("com.eygraber:uri-kmp:0.0.15")
implementation("ar.com.hjg:pngj:2.1.0")
implementation("mil.nga:tiff:3.0.0")
api("dev.icerock.moko:resources:$mokoVersion")
Expand All @@ -64,8 +64,7 @@ kotlin {
val jvmCommonMain by creating {
dependsOn(commonMain)
dependencies {
// TODO Migrate to CIO engine when issue with connection timeouts on emulator will be solved
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
implementation("io.ktor:ktor-client-cio:$ktorVersion")
}
}
val jvmCommonTest by creating {
Expand Down Expand Up @@ -97,11 +96,13 @@ kotlin {
dependsOn(jvmCommonTest)
}
val jsMain by getting {
dependsOn(commonMain)
dependencies {
implementation("io.ktor:ktor-client-js:$ktorVersion")
}
}
val jsTest by getting {
dependsOn(commonTest)
dependencies {
implementation(kotlin("test-js"))
}
Expand All @@ -125,6 +126,14 @@ kotlin {
implementation("androidx.test:rules:1.5.0")
}
}
all {
languageSettings {
@Suppress("OPT_IN_USAGE")
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}
}
}

Expand Down Expand Up @@ -236,4 +245,10 @@ signing {
System.getenv("GPG_PRIVATE_PASSWORD")
)
sign(publishing.publications)
}

// https://github.com/gradle/gradle/issues/26091
tasks.withType<AbstractPublishToMaven>().configureEach {
val signingTasks = tasks.withType<Sign>()
mustRunAfter(signingTasks)
}
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TiffIFDEntry(
require(type == TiffConstants.Type.ASCII) {
logMessage(ERROR, "TiffIFDEntry", "getIFDEntryValue","Invalid Key Type - ASCII required.")
}
return getIFDEntryValue(true).map { it.toChar() }.joinToString("")
return getIFDEntryValue(true).map { it.toInt().toChar() }.joinToString("")
}

private fun getIFDTypeLength() = when (type) {
Expand Down

0 comments on commit aa93854

Please sign in to comment.