diff --git a/build.gradle.kts b/build.gradle.kts index 918fb6a..c56571f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,20 +3,20 @@ plugins { // See https://guides.gradle.org/creating-build-scans/#enable_build_scans_on_all_builds_of_your_project id("com.gradle.build-scan") version "2.1" - // Sets up standard lifecycle tasks like `build` and `assemble`. - // Also required for the Zip task to compute its archive file name. base } group = "com.rhubarb_lip_sync" version = "2.0.0-pre-alpha" +val distsDirName = convention.getPlugin(BasePluginConvention::class).distsDirName + tasks { val zip by creating(Zip::class) { subprojects.forEach { dependsOn("${it.name}:assemble") } for (subproject in subprojects) { - from(File(subproject.buildDir, "distributions")) { + from(File(subproject.buildDir, distsDirName)) { into(if (subproject.name == "rhubarb") "" else subproject.name) } } diff --git a/rhubarb-for-after-effects/build.gradle.kts b/rhubarb-for-after-effects/build.gradle.kts index 044b3c4..18309f9 100644 --- a/rhubarb-for-after-effects/build.gradle.kts +++ b/rhubarb-for-after-effects/build.gradle.kts @@ -1,12 +1,17 @@ -tasks { - var distDirectory = File(project.buildDir, "distributions") +plugins { + base +} - val assemble by creating(Copy::class) { +val distsDirName = convention.getPlugin(BasePluginConvention::class).distsDirName +var distDirectory = File(project.buildDir, distsDirName) + +tasks { + val copy by creating(Copy::class) { from(listOf("Rhubarb Lip Sync.jsx", "README.adoc")) into(distDirectory) } - - val build by creating { - dependsOn(assemble) + + assemble { + dependsOn(copy) } } diff --git a/rhubarb-for-spine/build.gradle.kts b/rhubarb-for-spine/build.gradle.kts index 4863931..cc75424 100644 --- a/rhubarb-for-spine/build.gradle.kts +++ b/rhubarb-for-spine/build.gradle.kts @@ -18,9 +18,10 @@ dependencies { testCompile("org.assertj:assertj-core:3.11.1") } -tasks { - var distDirectory = File(project.buildDir, "distributions") +val distsDirName = convention.getPlugin(BasePluginConvention::class).distsDirName +var distDirectory = File(project.buildDir, distsDirName) +tasks { withType { kotlinOptions.jvmTarget = "1.8" } diff --git a/rhubarb-for-vegas/build.gradle.kts b/rhubarb-for-vegas/build.gradle.kts index 6656490..ff7be84 100644 --- a/rhubarb-for-vegas/build.gradle.kts +++ b/rhubarb-for-vegas/build.gradle.kts @@ -1,7 +1,12 @@ -tasks { - var distDirectory = File(project.buildDir, "distributions") +val distsDirName = convention.getPlugin(BasePluginConvention::class).distsDirName +var distDirectory = File(project.buildDir, distsDirName) - val assemble by creating(Copy::class) { +plugins { + base +} + +tasks { + val copy by creating(Copy::class) { from(listOf( "Debug Rhubarb.cs", "Debug Rhubarb.cs.config", @@ -12,7 +17,7 @@ tasks { into(distDirectory) } - create("build") { - dependsOn(assemble) + assemble { + dependsOn(copy) } }