Update to Kotlin 1.60 and Gradle 4.9

Removes the dependency on legacy script compilation and now relies on script
discovery.  In addition, the Gradle build scripts were refactored and updated
to be compatible with Gradle 5.0 and make use of the new java-library
configurations.
This commit is contained in:
Gary Tierney
2018-08-19 19:26:51 +01:00
parent 7fee8277ab
commit 0651d535fa
20 changed files with 171 additions and 181 deletions
+59
View File
@@ -0,0 +1,59 @@
apply plugin: "jacoco"
allprojects {
tasks.withType(Test) {
jacoco {
toolVersion = '0.8.1'
}
afterEvaluate {
jacocoTestReport {
dependsOn tasks.test
sourceSets sourceSets.main
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
}
}
}
task jacocoTestReport(type: JacocoReport) {
sourceDirectories = files()
classDirectories = files()
executionData = files()
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
// Work-around to allow us to build list of executionData files in doFirst
onlyIf = {
true
}
/*
* Builds list of source dirs, class dirs, and executionData files
* when task is run, not at script evaluation time
*/
doFirst {
subprojects.findAll { subproject ->
subproject.pluginManager.hasPlugin('java')
}.each { subproject ->
additionalSourceDirs files((Set<File>) subproject.sourceSets.main.allJava.srcDirs)
additionalClassDirs((FileCollection) subproject.sourceSets.main.output)
if (subproject.pluginManager.hasPlugin('jacoco')) {
executionData subproject.tasks.jacocoTestReport.executionData
}
}
executionData = files(executionData.findAll {
it.exists()
})
}
}
+5
View File
@@ -0,0 +1,5 @@
allprojects {
plugins.withId('kotlin') {
kotlin { experimental { coroutines 'enable' } }
}
}
+14
View File
@@ -0,0 +1,14 @@
ext {
kotlinVersion = '1.2.60'
kotlinxCoroutinesVersion = '0.24.0'
junitVersion = '4.12'
powermockVersion = '1.6.4'
bouncycastleVersion = '1.54'
c3p0Version = '0.9.5.2'
scryptVersion = '1.4.0'
nettyVersion = '4.0.34.Final'
guavaVersion = '19.0'
commonsCompressVersion = '1.10'
assertjVersion = '3.8.0'
classpathScannerVersion = '2.0.21'
}