Skip to content

Commit

Permalink
Update Kotlin, Dokka, and SemVer plug-ins (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
serras authored Mar 31, 2023
1 parent cba09cc commit f1d46a9
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 21 deletions.
6 changes: 6 additions & 0 deletions arrow-gradle-config-dokka-fence-workaround/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ dependencies {
compileOnly(libs.dokka.core)
compileOnly(libs.dokka.gfmPlugin)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ import org.jetbrains.dokka.pages.Style
import org.jetbrains.dokka.pages.TextStyle
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.DokkaPlugin
import org.jetbrains.dokka.plugability.DokkaPluginApiPreview
import org.jetbrains.dokka.plugability.Extension
import org.jetbrains.dokka.plugability.ExtensionPoint
import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.query
import org.jetbrains.dokka.renderers.Renderer
Expand Down Expand Up @@ -81,6 +83,10 @@ class DokkaFenceWorkaround : DokkaPlugin() {
::DokkaLocationProviderFactory override
listOf(gfmPlugin.locationProvider)
}

@OptIn(DokkaPluginApiPreview::class)
override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement =
PluginApiPreviewAcknowledgement
}

class JekyllRenderer(context: DokkaContext) : CommonmarkRenderer(context) {
Expand Down
6 changes: 6 additions & 0 deletions arrow-gradle-config-formatter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ dependencies {
compileOnly(libs.kotlin.gradlePlugin)
implementation(libs.spotless)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
6 changes: 6 additions & 0 deletions arrow-gradle-config-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ pluginBundle {
dependencies {
compileOnly(libs.kotlin.gradlePlugin)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,18 @@ tasks {
}
}

withType<JavaCompile>().configureEach {
targetCompatibility = "${JavaVersion.toVersion(8)}"
sourceCompatibility = "${JavaVersion.toVersion(8)}"
}

withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}

named("clean") { doFirst { delete("$projectDir/../../../arrow-site/docs/apidocs") } }
}

configure<KotlinProjectExtension> { explicitApi() }
configure<KotlinProjectExtension> {
explicitApi()
}

configure<JavaPluginExtension> {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}

if (isKotlinMultiplatform) {
configure<KotlinMultiplatformExtension> {
Expand Down
6 changes: 6 additions & 0 deletions arrow-gradle-config-nexus/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ pluginBundle {
dependencies {
implementation(libs.gradleNexus.publishPlugin)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
8 changes: 7 additions & 1 deletion arrow-gradle-config-publish/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pluginBundle {
}

dependencies {
compileOnly(libs.android)
// compileOnly(libs.android)
compileOnly(libs.kotlin.gradlePlugin)
implementation(libs.dokka.gradlePlugin)
implementation(libs.gradle.publishPlugin)
Expand All @@ -44,3 +44,9 @@ file("$buildDir/generated-sources/version/kotlin/ArrowGradleConfigVersion.kt").a
""".trimMargin()
)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

package io.arrow.gradle.config.publish.internal

import com.android.build.gradle.LibraryExtension
import java.io.File
import org.gradle.api.Project
import org.gradle.api.tasks.SourceSetContainer
Expand Down Expand Up @@ -36,6 +35,7 @@ internal val Project.sourcesJar: Jar
isKotlinJvm || isGradlePlugin -> {
(project.properties["sourceSets"] as SourceSetContainer)["main"].allSource
}
/*
isAndroidLibrary -> {
(project.extensions.getByName("android") as LibraryExtension)
.sourceSets
Expand All @@ -44,6 +44,7 @@ internal val Project.sourcesJar: Jar
.java
.srcDirs
}
*/
else -> emptySet()
}
if (sources.toList().isNotEmpty()) from(sources)
Expand Down
6 changes: 6 additions & 0 deletions arrow-gradle-config-versioning/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ dependencies {
api(libs.javiersc.semver.semverGradlePlugin)
implementation(libs.gradle.publishPlugin)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id("com.javiersc.semver.gradle.plugin")
id("com.javiersc.semver")
}
6 changes: 6 additions & 0 deletions build-src/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ dependencies {
implementation(libs.gradleNexus.publishPlugin)
implementation(libs.kotlin.gradlePlugin)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
1 change: 0 additions & 1 deletion build-src/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
enableFeaturePreview("VERSION_CATALOGS")

dependencyResolutionManagement {
versionCatalogs {
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ android = "7.4.1"
arrow = "1.1.5"
arrowGradleConfig = "0.11.0"
coroutines = "1.6.4"
dokka = "1.7.20"
dokka = "1.8.10"
gradlePublish = "0.21.0"
javierscSemverGradlePlugin = "0.1.0-alpha.10"
javierscSemverGradlePlugin = "0.5.0-alpha.2"
kotlin = "1.8.10"
nexusPublish = "1.1.0"
spotless = "6.15.0"
nexusPublish = "1.3.0"
spotless = "6.17.0"

[libraries]
android = { module = "com.android.tools.build:gradle", version.ref = "android" }
Expand Down
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("VERSION_CATALOGS")

dependencyResolutionManagement {
repositories {
Expand Down

0 comments on commit f1d46a9

Please sign in to comment.