Skip to content

Commit

Permalink
Update gradle config (#85)
Browse files Browse the repository at this point in the history
Update dependency version, including Kotlin to 1.6.20
Use gradle version catalog
Remove buildSrc
Use kotlinx-resources for turf tests
Change artifact version to 0.2.0-SHAPSHOT
  • Loading branch information
dellisd authored Apr 15, 2022
1 parent 5ae3087 commit 38bc19c
Show file tree
Hide file tree
Showing 15 changed files with 2,017 additions and 168 deletions.
40 changes: 8 additions & 32 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,49 +1,25 @@
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath(deps.plugins.publish)
}
}
import io.gitlab.arturbosch.detekt.Detekt

plugins {
id("org.jetbrains.kotlin.multiplatform") version Versions.kotlin apply false
id("org.jetbrains.kotlin.plugin.serialization") version Versions.kotlin apply false
id("io.gitlab.arturbosch.detekt") version Versions.detekt
id("org.jetbrains.dokka") version Versions.dokka
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.publish) apply false
alias(libs.plugins.detekt)
alias(libs.plugins.dokka)
}

repositories {
mavenCentral()
jcenter()
jcenter {
content {
// just allow to include kotlinx projects
// detekt needs "kotlinx-html" for the html report
includeGroup("org.jetbrains.kotlinx")
}
}
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
}

subprojects {
group = "io.github.dellisd.spatialk"
version = "0.0.2"
google()
}

allprojects {
repositories {
mavenCentral()
jcenter()
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap" )
maven(url = "https://kotlin.bintray.com/kotlinx" )
google()
}
}

detekt {
failFast = false
buildUponDefaultConfig = true
reports {
html.enabled = true
Expand All @@ -52,7 +28,7 @@ detekt {
input = files(rootProject.projectDir)
}

tasks.withType<io.gitlab.arturbosch.detekt.Detekt> {
tasks.withType<Detekt> {
jvmTarget = "11"
}

Expand Down
7 changes: 0 additions & 7 deletions buildSrc/build.gradle.kts

This file was deleted.

13 changes: 0 additions & 13 deletions buildSrc/src/main/kotlin/Deps.kt

This file was deleted.

6 changes: 0 additions & 6 deletions buildSrc/src/main/kotlin/Versions.kt

This file was deleted.

19 changes: 9 additions & 10 deletions geojson/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id("org.jetbrains.kotlin.multiplatform")
id("org.jetbrains.kotlin.plugin.serialization")
id("org.jetbrains.dokka")
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.dokka)
alias(libs.plugins.publish)
}

kotlin {
Expand All @@ -22,7 +23,7 @@ kotlin {
ios("ios")

sourceSets["commonMain"].dependencies {
api(deps.kotlinx.serialization)
api(libs.kotlinx.serialization)
}

sourceSets["commonTest"].dependencies {
Expand All @@ -48,10 +49,10 @@ kotlin {
sourceSets {
all {
with(languageSettings) {
useExperimentalAnnotation("kotlin.RequiresOptIn")
useExperimentalAnnotation("kotlin.js.ExperimentalJsExport")
useExperimentalAnnotation("kotlinx.serialization.InternalSerializationApi")
useExperimentalAnnotation("kotlinx.serialization.ExperimentalSerializationApi")
optIn("kotlin.RequiresOptIn")
optIn("kotlin.js.ExperimentalJsExport")
optIn("kotlinx.serialization.InternalSerializationApi")
optIn("kotlinx.serialization.ExperimentalSerializationApi")
}
}

Expand All @@ -71,5 +72,3 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
// custom output directory
outputDirectory.set(buildDir.resolve("$rootDir/docs/api"))
}

apply(plugin = "com.vanniktech.maven.publish")
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kotlin.code.style=official

GROUP=io.github.dellisd.spatialk
VERSION_NAME=0.1.1
VERSION_NAME=0.2.0-SNAPSHOT

POM_URL=https://github.com/dellisd/spatial-k
POM_SCM_URL=https://github.com/dellisd/spatial-k
Expand All @@ -15,5 +15,5 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=dellisd
POM_DEVELOPER_NAME=Derek Ellis

kotlin.js.compiler=both
kotlin.js.compiler=ir
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
16 changes: 16 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[versions]
kotlin = "1.6.20"
resources = "0.2.1"

[libraries]
resources = { module = "com.goncalossilva:resources", version.ref = "resources" }
kotlinx-serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2"

[plugins]
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

publish = { id = "com.vanniktech.maven.publish", version = "0.19.0" }
detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.17.0" }
dokka = { id = "org.jetbrains.dokka", version = "1.4.32" }
resources = { id = "com.goncalossilva.resources", version.ref = "resources" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Tue May 05 21:07:34 EDT 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
Loading

0 comments on commit 38bc19c

Please sign in to comment.