Skip to content

Commit

Permalink
Remove Kotlin extensions (reactor#2949)
Browse files Browse the repository at this point in the history
This commit removes Kotlin extensions from core repo, since they have
been replaced with those in reactor-kotlin-extensions repository.

This also removes dependencies to Kotlin stdlib, language, plugins...
as well as kotlin entries in the generated OSGI manifests.

Finally, a japicmp exception is added for the removed classes.

Fixes reactor#2912.
  • Loading branch information
simonbasle authored Mar 8, 2022
1 parent c8abc63 commit b637e50
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 1,463 deletions.
5 changes: 0 additions & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@
"groupName": "Micrometer 1.3.0",
"groupSlug": "micrometer",
"allowedVersions": "=1.3.0"
},
{
"matchPackagePrefixes": ["org.jetbrains.kotlin"],
"groupName": "Kotlin",
"allowedVersions": "<1.6.0"
}
]
}
24 changes: 0 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ buildscript {


plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.artifactory)
alias(libs.plugins.shadow)
alias(libs.plugins.asciidoctor.convert) apply false
Expand Down Expand Up @@ -215,27 +214,4 @@ configure(subprojects) { p ->
// these apply once the above configure is done, but before project-specific build.gradle have applied
apply plugin: "io.reactor.gradle.java-conventions"
apply from: "${rootDir}/gradle/javadoc.gradle"

// these apply AFTER project-specific build.gradle have applied
afterEvaluate {
if (p.plugins.hasPlugin("kotlin")) {
println "Applying Kotlin conventions to ${p.name}"
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = ["-Xjsr305=strict"]
languageVersion = "1.3" //TODO kotlin languageVersion 1.3 is now deprecated
apiVersion = "1.3"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = ["-Xjsr305=strict"]
languageVersion = "1.3" //TODO kotlin languageVersion 1.3 is now deprecated
apiVersion = "1.3"
}
}
}
}
}
3 changes: 0 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ asciidoctor = "3.3.2"
bytebuddy = "1.12.8"
jmh = "1.34"
junit = "5.8.2"
kotlin = "1.5.32"
reactiveStreams = "1.0.3"

[libraries]
Expand All @@ -26,7 +25,6 @@ jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" }
jsr166backport = "io.projectreactor:jsr166:1.0.0.RELEASE"
jsr305 = "com.google.code.findbugs:jsr305:3.0.1"
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
logback = "ch.qos.logback:logback-classic:1.2.11"
micrometer = "io.micrometer:micrometer-core:1.3.0"
mockito = "org.mockito:mockito-core:4.3.1"
Expand All @@ -46,7 +44,6 @@ bnd = { id = "biz.aQute.bnd.builder", version = "6.2.0" }
download = { id = "de.undercouch.download", version = "5.0.1" }
japicmp = { id = "me.champeau.gradle.japicmp", version = "0.3.1" }
jcstress = { id = "io.github.reyerizo.gradle.jcstress", version = "0.8.13" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
nohttp = { id = "io.spring.nohttp", version = "0.0.10" }
shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
spotless = { id = "com.diffplug.spotless", version = "6.3.0" }
Expand Down
14 changes: 7 additions & 7 deletions reactor-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import me.champeau.gradle.japicmp.JapicmpTask
apply plugin: 'idea' // needed to avoid IDEA seeing the jmh folder as source
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'org.unbroken-dome.test-sets'
apply plugin: 'kotlin'
apply plugin: 'jcstress'
apply plugin: 'java-library'

ext {
bndOptions = [
Expand All @@ -33,7 +33,6 @@ ext {
"!javax.annotation",
"!javax.annotation.meta",
'org.slf4j;resolution:=optional;version="[1.5.4,2)"',
"kotlin.*;resolution:=optional",
"reactor.blockhound.*;resolution:=optional",
"io.micrometer.*;resolution:=optional",
"*"
Expand Down Expand Up @@ -86,10 +85,6 @@ dependencies {
// Optional Metrics
compileOnly libs.micrometer

// Not putting kotlin-stdlib as implementation to not force it as a transitive lib
compileOnly libs.kotlin.stdlib
testImplementation libs.kotlin.stdlib

// Optional BlockHound support
compileOnly libs.blockhound
// Also make BlockHound visible in the CP of dedicated testset
Expand Down Expand Up @@ -161,7 +156,12 @@ task japicmp(type: JapicmpTask) {

// TODO after a .0 release, bump the gradle.properties baseline
// TODO after a .0 release, remove the reactor-core exclusions below if any
classExcludes = [ ]
classExcludes = [
"reactor.core.publisher.FluxExtensionsKt",
"reactor.core.publisher.MonoExtensionsKt",
"reactor.core.publisher.MonoWhenFunctionsKt",
"reactor.util.function.TupleExtensionsKt"
]
methodExcludes = [ 'reactor.core.publisher.Sinks$EmitFailureHandler#busyLooping(java.time.Duration)' ]
}

Expand Down
259 changes: 0 additions & 259 deletions reactor-core/src/main/kotlin/reactor/core/publisher/FluxExtensions.kt

This file was deleted.

Loading

0 comments on commit b637e50

Please sign in to comment.