Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
ComBatVision committed Dec 3, 2023
1 parent 607b962 commit 28cecfd
Show file tree
Hide file tree
Showing 19 changed files with 341 additions and 558 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
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
val kotlinVersion = "1.8.22"
val kotlinVersion = "1.9.21"
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
}
Expand All @@ -22,6 +22,7 @@ allprojects {
set("minSdk", 21)
set("targetSdk", 34)
set("versionCode", 8)
set("javaVersion", JavaVersion.VERSION_17)
}

repositories {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ 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
android.nonTransitiveRClass=true
android.suppressUnsupportedCompileSdk=34
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.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
760 changes: 257 additions & 503 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.0")
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions worldwind-examples-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,22 @@ android {

compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = extra["javaVersion"] as JavaVersion
targetCompatibility = extra["javaVersion"] as JavaVersion
}

kotlinOptions {
jvmTarget = extra["javaVersion"].toString()
}
}

dependencies {
implementation(project(":worldwind"))
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("com.google.android.material:material:1.10.0")
implementation("io.github.missioncommand:mil-sym-android-renderer:0.1.54")

coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
}
31 changes: 22 additions & 9 deletions worldwind-tutorials/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,35 @@ kotlin {
}
}
}
android {

androidTarget {
compilations.all {
kotlinOptions.jvmTarget = extra["javaVersion"].toString()
}
}
sourceSets {
val commonMain by getting {
dependencies {
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.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
implementation("com.google.android.material:material:1.10.0")
}
}
all {
languageSettings {
@Suppress("OPT_IN_USAGE")
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}
}
Expand Down Expand Up @@ -65,11 +78,11 @@ android {

compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = extra["javaVersion"] as JavaVersion
targetCompatibility = extra["javaVersion"] as JavaVersion
}
}

dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
}
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class MainActivity: AppCompatActivity(), NavigationView.OnNavigationItemSelected
private fun loadTutorial(globeFragment: Class<out Fragment>, url: String, titleId: Int) {
try {
setTitle(titleId)
val globe = globeFragment.newInstance()
val globe = globeFragment.getDeclaredConstructor().newInstance()
supportFragmentManager
.beginTransaction()
.replace(R.id.globe_container, globe) // replace (destroy) existing fragment (if any)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@file:JsExport
@file:Suppress("OPT_IN_USAGE", "NON_EXPORTABLE_TYPE")

package earth.worldwind.tutorials

Expand Down
45 changes: 31 additions & 14 deletions worldwind/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ multiplatformResources {
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = extra["javaVersion"].toString()
}
testRuns["test"].executionTask.configure {
useJUnit()
Expand All @@ -32,21 +32,24 @@ kotlin {
}
}
}
android {
androidTarget {
publishLibraryVariants("release")
compilations.all {
kotlinOptions.jvmTarget = extra["javaVersion"].toString()
}
}
sourceSets {
val mockkVersion = "1.13.3"
val mockkVersion = "1.13.4"
val mokoVersion = "0.23.0"
val ktorVersion = "2.2.4"
val ktorVersion = "2.3.6"
val commonMain by getting {
dependencies {
api("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.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.6.2")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.github.pdvrieze.xmlutil:serialization:0.85.0")
implementation("com.eygraber:uri-kmp:0.0.11")
implementation("io.github.pdvrieze.xmlutil:serialization:0.86.2")
implementation("com.eygraber:uri-kmp:0.0.15")
api("dev.icerock.moko:resources:$mokoVersion")
}
}
Expand Down Expand Up @@ -77,7 +80,7 @@ kotlin {
implementation("org.jogamp.gluegen:gluegen-rt:$joglVersion")
implementation("org.jogamp.jogl:jogl-all:$joglVersion")

val lwjglVersion = "3.3.1"
val lwjglVersion = "3.3.3"
implementation("org.lwjgl:lwjgl:$lwjglVersion")
implementation("org.lwjgl:lwjgl-assimp:$lwjglVersion")
implementation("org.lwjgl:lwjgl-glfw:$lwjglVersion")
Expand All @@ -92,19 +95,21 @@ 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"))
}
}
val androidMain by getting {
dependsOn(jvmCommonMain)
dependencies {
implementation("androidx.annotation:annotation:1.6.0")
implementation("androidx.annotation:annotation:1.7.0")
implementation("androidx.appcompat:appcompat-resources:1.6.1")
implementation("io.github.missioncommand:mil-sym-android-renderer:0.1.54")
}
Expand All @@ -120,6 +125,14 @@ kotlin {
implementation("androidx.test:rules:1.5.0")
}
}
all {
languageSettings {
@Suppress("OPT_IN_USAGE")
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}
}
}

Expand All @@ -144,13 +157,13 @@ android {
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = extra["javaVersion"] as JavaVersion
targetCompatibility = extra["javaVersion"] as JavaVersion
}
}

dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
}

// Do not generate Intrinsics runtime assertion for performance reasons
Expand All @@ -165,6 +178,10 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class)
}
}

afterEvaluate {
tasks.named("generateMRandroidMain") { dependsOn("androidReleaseSourcesJar") }
}

val dokkaOutputDir = "$buildDir/dokka"
tasks.getByName<org.jetbrains.dokka.gradle.DokkaTask>("dokkaHtml") {
outputDirectory.set(file(dokkaOutputDir))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ actual open class MilStd2525Placemark actual constructor(
*
* @return A new [PlacemarkAttributes] bundle representing the MIL-STD-2525 symbol.
*/
@JvmStatic
actual fun getPlacemarkAttributes(
symbolCode: String, symbolModifiers: Map<String, String>?, symbolAttributes: Map<String, String>?
): PlacemarkAttributes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import earth.worldwind.shape.*
import earth.worldwind.util.Logger
import kotlin.math.roundToInt

actual open class MilStd2525TacticalGraphic actual constructor(
actual open class MilStd2525TacticalGraphic @JvmOverloads actual constructor(
sidc: String, locations: List<Location>,
boundingSector: Sector, modifiers: Map<String, String>?, attributes: Map<String, String>?
) : AbstractMilStd2525TacticalGraphic(sidc, locations, boundingSector, modifiers, attributes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ open class Matrix3 private constructor(
*
* @return this matrix set to the inverse of the specified matrix
*/
fun invertMatrix(matrix: Matrix3): Matrix3 {
@Suppress("UNUSED_PARAMETER")
fun invertMatrix(matrix: Matrix3): Matrix3 {
TODO("Matrix3.invertMatrix is not implemented")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ abstract class AbstractGraticuleLayer(name: String): AbstractLayer(name) {
altitudeMode = AltitudeMode.CLAMP_TO_GROUND
}

@Suppress("UNUSED_PARAMETER")
fun createTextRenderable(position: Position, label: String, resolution: Double) = Label(position, label).apply {
altitudeMode = AltitudeMode.CLAMP_TO_GROUND
// priority = resolution * 1e6 // TODO Implement priority
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package earth.worldwind.shape.milstd2525

import earth.worldwind.geom.Position
import earth.worldwind.shape.PlacemarkAttributes
import kotlin.jvm.JvmStatic

expect open class MilStd2525Placemark(
symbolCode: String,
Expand All @@ -11,10 +10,8 @@ expect open class MilStd2525Placemark(
symbolAttributes: Map<String, String>? = null
) : AbstractMilStd2525Placemark {
companion object {
@JvmStatic
fun clearSymbolCache()

@JvmStatic
fun getPlacemarkAttributes(
symbolCode: String,
symbolModifiers: Map<String, String>? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package earth.worldwind.shape.milstd2525

import earth.worldwind.geom.Location
import earth.worldwind.geom.Sector
import kotlin.jvm.JvmOverloads

expect open class MilStd2525TacticalGraphic @JvmOverloads constructor(
expect open class MilStd2525TacticalGraphic(
sidc: String, locations: List<Location>, boundingSector: Sector = defaultBoundingSector(locations),
modifiers: Map<String, String>? = null, attributes: Map<String, String>? = null
) : AbstractMilStd2525TacticalGraphic
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
package earth.worldwind.util

import kotlin.jvm.JvmOverloads
import kotlin.jvm.JvmStatic

expect object Logger {
val ERROR: Int
val WARN: Int
val INFO: Int
val DEBUG: Int

@JvmStatic
fun isLoggable(priority: Int): Boolean

/**
Expand All @@ -20,14 +16,9 @@ expect object Logger {
* @param message The message to log. Nothing is logged if the message is null or undefined.
* @param tr Optional exception
*/
@JvmStatic
@JvmOverloads
fun log(priority: Int, message: String, tr: Throwable? = null)

@JvmStatic
@JvmOverloads
fun logMessage(level: Int, className: String, methodName: String, message: String, tr: Throwable? = null): String

@JvmStatic
fun makeMessage(className: String, methodName: String, message: String): String
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import earth.worldwind.shape.*
import earth.worldwind.util.Logger
import java.awt.geom.Point2D

actual open class MilStd2525TacticalGraphic actual constructor(
actual open class MilStd2525TacticalGraphic @JvmOverloads actual constructor(
sidc: String, locations: List<Location>,
boundingSector: Sector, modifiers: Map<String, String>?, attributes: Map<String, String>?
) : AbstractMilStd2525TacticalGraphic(sidc, locations, boundingSector, modifiers, attributes) {
Expand Down

0 comments on commit 28cecfd

Please sign in to comment.