diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8e9625..ad0037d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup - uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v0.4 + uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v1.0 - name: Build - uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-build@v0.4 + uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-build@v1.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8b642c..4c4a77c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup - uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v0.4 + uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v1.0 - name: Release - uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-release@v0.4 + uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-release@v1.0 with: signing-file: ${{ secrets.SIGNINGFILE }} signing-key-id: ${{ secrets.SIGNINGKEYID }} diff --git a/build.gradle.kts b/build.gradle.kts index f30add7..4c64b54 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,7 +21,7 @@ plugins { // project plugins groovy - kotlin("jvm") version "1.9.10" + kotlin("jvm") version "1.9.21" // test coverage jacoco @@ -32,9 +32,6 @@ plugins { // artifact signing - necessary on Maven Central signing - // intershop version plugin - id("com.intershop.gradle.version.gitflow") version "1.8.0" - // plugin for documentation id("org.asciidoctor.jvm.convert") version "3.3.2" @@ -47,43 +44,40 @@ plugins { id("com.dorongold.task-tree") version "2.1.1" } - -gitflowVersion { - versionType = "three" - defaultVersion = "1.0.0" -} - // release configuration group = "com.intershop.gradle.jaxb" description = "Gradle JAXB code generation plugin" -version = gitflowVersion.version +// apply gradle property 'projectVersion' to project.version, default to 'LOCAL' +val projectVersion : String? by project +version = projectVersion ?: "LOCAL" val sonatypeUsername: String? by project val sonatypePassword: String? by project repositories { mavenCentral() + mavenLocal() } -val pluginId = "com.intershop.gradle.jaxb" - +val pluginUrl = "https://github.com/IntershopCommunicationsAG/${project.name}" gradlePlugin { - val pluginURL = "https://github.com/IntershopCommunicationsAG/${project.name}" - website.set(pluginURL) - vcsUrl.set(pluginURL) + website = pluginUrl + vcsUrl = pluginUrl plugins { - create("jaxbPlugin") { - id = pluginId + create(project.name) { + id = "com.intershop.gradle.jaxb" implementationClass = "com.intershop.gradle.jaxb.JaxbPlugin" displayName = project.name description = project.description - tags.set(listOf("intershop", "jaxb", "build", "code", "generator")) + tags = listOf("intershop", "jaxb", "build", "code", "generator") } } } java { + withJavadocJar() + withSourcesJar() toolchain { languageVersion = JavaLanguageVersion.of(17) } @@ -91,7 +85,7 @@ java { // set correct project status if (project.version.toString().endsWith("-SNAPSHOT")) { - status = "snapshot'" + status = "snapshot" } val buildDir = layout.buildDirectory.asFile.get() @@ -178,9 +172,9 @@ tasks { jacocoTestReport.dependsOn("test") } - getByName("jar").dependsOn("asciidoctor") - - + jar.configure { + dependsOn(asciidoctor) + } dokkaJavadoc.configure { outputDirectory.set(buildDir.resolve("dokka")) @@ -221,7 +215,7 @@ publishing { pom { name.set(project.name) description.set(project.description) - url.set("https://github.com/IntershopCommunicationsAG/${project.name}") + url.set(pluginUrl) licenses { license { name.set("The Apache License, Version 2.0") @@ -243,7 +237,7 @@ publishing { scm { connection.set("git@github.com:IntershopCommunicationsAG/${project.name}.git") developerConnection.set("git@github.com:IntershopCommunicationsAG/${project.name}.git") - url.set("https://github.com/IntershopCommunicationsAG/${project.name}") + url.set(pluginUrl) } } } @@ -269,6 +263,6 @@ dependencies { implementation(gradleApi()) implementation(gradleKotlinDsl()) - testImplementation("com.intershop.gradle.test:test-gradle-plugin:4.1.2") + testImplementation("com.intershop.gradle.test:test-gradle-plugin:5.0.1") testImplementation(gradleTestKit()) }