Skip to content

Commit

Permalink
feat!: make plugin independent from com.intershop.gradle.version.gitf…
Browse files Browse the repository at this point in the history
…low (#92059)
  • Loading branch information
skiesewetter-intershop committed Dec 12, 2023
1 parent 5147d58 commit 44bd754
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
46 changes: 20 additions & 26 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
// project plugins
groovy

kotlin("jvm") version "1.9.10"
kotlin("jvm") version "1.9.21"

// test coverage
jacoco
Expand All @@ -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"

Expand All @@ -47,51 +44,48 @@ 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)
}
}

// set correct project status
if (project.version.toString().endsWith("-SNAPSHOT")) {
status = "snapshot'"
status = "snapshot"
}

val buildDir = layout.buildDirectory.asFile.get()
Expand Down Expand Up @@ -178,9 +172,9 @@ tasks {
jacocoTestReport.dependsOn("test")
}

getByName("jar").dependsOn("asciidoctor")


jar.configure {
dependsOn(asciidoctor)
}

dokkaJavadoc.configure {
outputDirectory.set(buildDir.resolve("dokka"))
Expand Down Expand Up @@ -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")
Expand All @@ -243,7 +237,7 @@ publishing {
scm {
connection.set("[email protected]:IntershopCommunicationsAG/${project.name}.git")
developerConnection.set("[email protected]:IntershopCommunicationsAG/${project.name}.git")
url.set("https://github.com/IntershopCommunicationsAG/${project.name}")
url.set(pluginUrl)
}
}
}
Expand All @@ -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())
}

0 comments on commit 44bd754

Please sign in to comment.