-
Notifications
You must be signed in to change notification settings - Fork 45
Migrate to Kotlin DSL #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
6e95ca2
cc98ce1
dca7361
03a8cfa
0dcd42f
90f14b1
756a841
16fc1c6
600cbb0
e86aea3
3fc7bb1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,23 +40,12 @@ pluginBundle { | |
} | ||
|
||
apply(plugin = "maven-publish") | ||
// TODO #171 remove once all groovy classes are migrated to kotlin | ||
apply(plugin = "groovy") | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
// TODO #171 remove once all groovy classes are migrated to kotlin | ||
val compileKotlinTask = tasks.compileKotlin.get() | ||
tasks { | ||
named<GroovyCompile>("compileGroovy") { | ||
dependsOn(compileKotlin) | ||
classpath = classpath.plus(files(compileKotlinTask.destinationDirectory)) | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly("org.scoverage:scalac-scoverage-plugin_2.13:1.4.2") | ||
implementation(group = "commons-io", name = "commons-io", version = "2.6") | ||
|
@@ -137,13 +126,6 @@ gradlePlugin { | |
testSourceSets(sourceSets["functionalTest"], sourceSets["crossScalaVersionTest"]) | ||
} | ||
|
||
// TODO #171 remove once all groovy classes are migrated to kotlin | ||
val groovydocJar by tasks.registering(Jar::class) { | ||
from("$buildDir/docs/groovydoc") | ||
archiveClassifier.set("groovydoc") | ||
dependsOn(tasks["groovydoc"]) | ||
} | ||
|
||
val kotlindocJar by tasks.registering(Jar::class) { | ||
from(tasks.dokkaHtml.get().outputDirectory) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that instead of
it is more idiomatic to rely on automatic dependencies propagation:
Gradle will automatically add a dependency on the |
||
archiveClassifier.set("kotlindoc") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, is |
||
|
@@ -209,7 +191,6 @@ configure<PublishingExtension> { | |
} | ||
} | ||
from(components["java"]) | ||
artifact(groovydocJar) | ||
artifact(kotlindocJar) | ||
artifact(sourcesJar) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved to the plugins block