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
@@ -47,30 +47,19 @@ class ApolloPluginExtension {
* and its scripts.
*/
def init() {
def gameProject = project.findProject(":game")
def pluginTestingProject = project.findProject(':game:plugin-testing')
project.plugins.apply('kotlin')
project.dependencies {
def transitiveGameDeps = gameProject.configurations["compile"].dependencies
def gameSources = gameProject.sourceSets.main
transitiveGameDeps.each { dependency ->
compile dependency
}
compile gameSources.output
testCompile pluginTestingProject
implementation project.findProject(':game')
implementation project.findProject(':cache')
implementation project.findProject(':net')
implementation project.findProject(':util')
testImplementation project.findProject(':game:plugin-testing')
}
project.sourceSets {
main.kotlin.srcDirs += this.srcDir
test.kotlin.srcDirs += this.testDir
}
project.tasks["compileKotlin"].kotlinOptions.freeCompilerArgs += [
"-script-templates", "org.apollo.game.plugin.kotlin.KotlinPluginScript"
]
}
def getDependencies() {