Add gradle compatibility tests; fix compatibility with 5.0

This commit is contained in:
Tad Fisher
2019-04-01 11:22:46 -07:00
parent 932f690610
commit 23de1b99d0
16 changed files with 226 additions and 36 deletions

View File

@@ -1,16 +1,17 @@
plugins {
id("com.github.johnrengelman.shadow") version "4.0.0"
`java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
kotlin("kapt") version embeddedKotlinVersion
id("com.github.johnrengelman.shadow") version "4.0.0"
id("org.ysb33r.gradletest") version "2.0-rc.4"
}
group = "org.nixos"
version = "1.0.0-SNAPSHOT"
repositories {
mavenCentral()
jcenter()
}
dependencies {
@@ -31,4 +32,33 @@ gradlePlugin {
implementationClass = "org.nixos.gradle2nix.Gradle2NixPlugin"
}
}
}
}
tasks {
gradleTest {
versions("5.0", "5.1.1", "5.2.1", "5.3.1")
kotlinDsl = true
}
gradleTestGenerator {
dependsOn(shadowJar)
doLast {
file(gradleTest.get().initScript).bufferedWriter().use { out ->
out.appendln("""
initscript {
dependencies {
classpath fileTree('file:${buildDir.absolutePath}/libs'.toURI()) {
include '*.jar'
}
""".trimIndent())
out.appendln("""
}
}
apply plugin: org.nixos.gradle2nix.Gradle2NixPlugin
""".trimIndent())
}
}
}
}