Skip to content

Commit

Permalink
bump 0.2 java 11 compatability and dependency upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
countableSet committed Apr 14, 2023
1 parent 780d28e commit e485f16
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 24 deletions.
5 changes: 3 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
= Semantic Version Gradle Plugin

Determines patch version based on what already exists in maven repository. More info in link:https://semantic-version.gradle.poolside.dev/[docs]. link:https://plugins.gradle.org/plugin/dev.poolside.gradle.semantic-version[Plugin].
* link:https://semantic-version.gradle.poolside.dev/[docs]
* link:https://plugins.gradle.org/plugin/dev.poolside.gradle.semantic-version[plugin site]
== Usage
tldr: determines and sets patch version based on what already exists in maven repository.

[source,kotlin]
----
Expand Down
2 changes: 1 addition & 1 deletion antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ output:
clean: true
ui:
bundle:
url: https://github.com/countableSet/antora-ui/releases/download/b2593412518/ui-bundle.zip
url: https://github.com/countableSet/antora-ui/releases/download/b4696819400/ui-bundle.zip
snapshot: true
supplemental_files:
- path: partials/header-content.hbs
Expand Down
32 changes: 15 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,43 @@ plugins {
`java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
id("com.gradle.plugin-publish") version "1.0.0-rc-1"
id("com.gradle.plugin-publish") version "1.2.0"
}

repositories {
mavenCentral()
}

dependencies {
testImplementation(platform("org.junit:junit-bom:5.8.2"))
testImplementation(platform("org.junit:junit-bom:5.9.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.3")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.3")
}

pluginBundle {
website = "https://semantic-version.gradle.poolside.dev"
vcsUrl = "https://github.com/countableSet/semantic-version-plugin"
description = "Based on a given major.minor version, plugin determines patch version based on what is already " +
"maven repository by auto incrementing it to produce the next version number. Major or minor versions " +
"must be manually changed"
tags = listOf("semantic version", "maven", "publish", "auto increment")
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.2")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.2")
}

gradlePlugin {
website.set("https://semantic-version.gradle.poolside.dev")
vcsUrl.set("https://github.com/countableSet/semantic-version-plugin")

plugins {
create("semanticVersionPlugin") {
id = "dev.poolside.gradle.semantic-version"
group = "dev.poolside.gradle.semanticversion"
implementationClass = "dev.poolside.gradle.semanticversion.SemanticVersionPlugin"
version = "0.1.5"
version = "0.2.0"
displayName = "Poolside Semantic Version Plugin"
description = "Based on a given major.minor version, plugin determines patch version based on what is already " +
"maven repository by auto incrementing it to produce the next version number. Major or minor versions " +
"must be manually changed"
tags.set(listOf("semantic version", "maven", "publish", "auto increment"))
}
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

tasks {
Expand All @@ -51,6 +49,6 @@ tasks {
}
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
}
}
23 changes: 21 additions & 2 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
= Home
:version: 0.1.3
:version: 0.2.0

Gradle plugin to auto-increment patch version on each call to `publish` task by looking up the most recent version published in the configured maven repository.
Gradle plugin to auto-increments the patch version on each call to the `publish` task by looking up the most recent version published in the publishing maven repository and adds it by one.

Tested to work in the following scenarios:

. Single root project publication
. Single and multiple subprojects publication
. BOM references via `api(platform(project(":bom")))` and `java-platform` plugin
. Manual versioning, prevents the task from publishing if the version isn't different from the one in maven

image::semantic-version-plugin.svg[]

== Change Log

* 0.2.x compatible with Java 11
** 0.2.0 set compatability to Java 11, bump dependency versions, and upgrade gradle to 8.1
* 0.1.x compatible with Java 8
** 0.1.5 fix bug when the plugin wasn't applying correct to root projects without jars
** 0.1.4 fix bug when major or minor version was bump was computed incorrectly
** 0.1.3 adds manual mode flag to skip publishing when artifact already exists
** 0.1.2 fix bug with version finder
** 0.1.1 unknown
** 0.1.0 unknown

== Import

link:https://plugins.gradle.org/plugin/dev.poolside.gradle.semantic-version[Plugins Page]
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class SemanticVersionPluginTest {
@JvmStatic
private fun gradleVersions(): Stream<Arguments> = Stream.of(
Arguments.of("7.4.2"),
Arguments.of("7.5.1")
Arguments.of("7.5.1"),
Arguments.of("7.6.1"),
Arguments.of("8.1")
)
}

Expand Down

0 comments on commit e485f16

Please sign in to comment.