Set projects versions based on git tags and following semantic versioning

Overview

Kotlin version MavenCentral Snapshot

Build Quality Tech debt

SemVer Gradle Plugin

Set projects versions based on git tags and following semantic versioning.

Inspired on Reckon but centered on supporting multi-project versions and combine normal stages with snapshot stage.

Download from MavenCentral

// buildSrc/build.gradle.kts

dependencies {
    implementation("com.javiersc.semver:semver-gradle-plugin:$version")
}

Usage

There are two Gradle properties which the plugin uses to detect automatically the current version based on the last tag in the current branch: semver.stage and semver.scope.

They can be set via CLI, for example:

./gradlew "-Psemver.stage=final" "-Psemver.scope=major"

Check example file or website to understand easily how it works.

All projects share the same version

Set the plugin in the root project:

// build.gradle.kts
plugins {
    id("com.javiersc.semver.gradle.plugin")
}

semver {
    tagPrefix.set("v") // default "v"
}

Different version in a specific project

All projects use the version based on the tag prefix v except library, which is declaring the plugin too with a different tag prefix, w.

// build.gradle.kts
plugins {
    id("com.javiersc.semver.gradle.plugin")
}

semver {
    tagPrefix.set("v")
}
// library/build.gradle.kts
plugins {
    id("com.javiersc.semver.gradle.plugin")
}

semver {
    tagPrefix.set("w")
}

Different version in all projects

Just apply the plugin in every project and set different tagPrefix for each one.

Version types

Final

  • Format: . .
  • Example: 1.0.0

Significant

  • Format: . . - .
  • Example: 1.0.0-alpha.1

Insignificant

  • Format: . . - . . +
  • Examples:
    • 1.0.0.4+2021-11-11T14-22-03-207850300Z
    • 1.0.0.4+26f0484

Snapshot

  • Format: . . -SNAPSHOT
  • Example: 1.0.0-SNAPSHOT

Stages

To change between stages, use the Gradle property -Psemver.stage=

The stage can be whatever word, except two reserved words: final and snapshot.

For multi-project + multi-version configuration, it is possible to override the version of a specific project which is applying the plugin via CLI, for example if the subproject is library:

./gradlew "-P:library:semver.stage=alpha"
# Last tag = v1.0.0-alpha.1
./gradlew "-Psemver.stage=alpha" # v1.0.0-alpha.2
./gradlew "-Psemver.stage=beta" # v1.0.0-beta.1
./gradlew "-Psemver.stage=rc" # v1.0.0-rc.1
./gradlew "-Psemver.stage=snapshot" # v1.0.1-SNAPSHOT (uses the next patch version)
./gradlew "-Psemver.stage=final" # v1.0.0

# Last tag = v1.0.0
./gradlew "-Psemver.stage=alpha" # v1.0.1-alpha.1
./gradlew "-Psemver.stage=beta" # v1.0.1-beta.1
./gradlew "-Psemver.stage=rc" # v1.0.1-rc.1
./gradlew "-Psemver.stage=snapshot" # v1.0.1-SNAPSHOT (still uses the same patch version)
./gradlew "-Psemver.stage=final" # v1.0.1

Scopes

To change between scopes, use the Gradle property -Psemver.scope=

The scope has to be one of major, minor, patch or auto.

# Last tag = v1.0.0-alpha.1
./gradlew "-Psemver.scope=major" # v2.0.0
./gradlew "-Psemver.scope=minor" # v1.1.0
./gradlew "-Psemver.scope=patch" # v1.0.1
./gradlew "-Psemver.scope=auto" # v1.0.0-alpha.2 (uses the next num version)

# Last tag = v1.0.0
./gradlew "-Psemver.scope=major" # v2.0.0
./gradlew "-Psemver.scope=minor" # v1.1.0
./gradlew "-Psemver.scope=patch" # v1.0.1
./gradlew "-Psemver.scope=auto" # v1.0.1 (uses the next patch version)

Combine stages and scopes

# Last tag = v1.0.0-alpha.1
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=major" # v2.0.0-alpha.1
./gradlew "-Psemver.stage=beta" "-Psemver.scope=major" # v2.0.0-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=major" # v2.0.0-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=major" # v2.0.0
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=major" # v2.0.0-SNAPSHOT

# Last tag = v1.0.0-alpha.1
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=minor" # v1.1.0-alpha.1
./gradlew "-Psemver.stage=beta" "-Psemver.scope=minor" # v1.1.0-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=minor" # v1.1.0-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=minor" # v1.1.0
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=minor" # v1.1.0-SNAPSHOT

# Last tag = v1.0.0-alpha.1
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=patch" # v1.0.1-alpha.1
./gradlew "-Psemver.stage=beta" "-Psemver.scope=patch" # v1.0.1-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=patch" # v1.0.1-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=patch" # v1.0.1
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=patch" # v1.0.1-SNAPSHOT

# Last tag = v1.0.0-alpha.1
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=auto" # v1.0.0-alpha.2
./gradlew "-Psemver.stage=beta" "-Psemver.scope=auto" # v1.0.1-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=auto" # v1.0.1-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=auto" # v1.0.1
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=auto" # v1.0.1-SNAPSHOT

# Last tag = v1.0.0
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=major" # v2.0.0-alpha.1
./gradlew "-Psemver.stage=beta" "-Psemver.scope=major" # v2.0.0-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=major" # v2.0.0-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=major" # v2.0.0
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=major" # v2.0.0-SNAPSHOT

# Last tag = v1.0.0
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=minor" # v1.1.0-alpha.1
./gradlew "-Psemver.stage=beta" "-Psemver.scope=minor" # v1.1.0-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=minor" # v1.1.0-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=minor" # v1.1.0
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=minor" # v1.1.0-SNAPSHOT

# Last tag = v1.0.0
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=patch" # v1.0.1-alpha.1
./gradlew "-Psemver.stage=beta" "-Psemver.scope=patch" # v1.0.1-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=patch" # v1.0.1-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=patch" # v1.0.1
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=patch" # v1.0.1-SNAPSHOT

# Last tag = v1.0.0
./gradlew "-Psemver.stage=alpha" "-Psemver.scope=auto" # v1.0.1-alpha.1
./gradlew "-Psemver.stage=beta" "-Psemver.scope=auto" # v1.0.1-beta.1
./gradlew "-Psemver.stage=rc" "-Psemver.scope=auto" # v1.0.1-rc.1
./gradlew "-Psemver.stage=final" "-Psemver.scope=auto" # v1.0.1
./gradlew "-Psemver.stage=snapshot" "-Psemver.scope=auto" # v1.0.1-SNAPSHOT
Comments
  • One submodule doesn't get the right version

    One submodule doesn't get the right version

    Noticed something strange in a multi-module project. One of the submodule, doesn't read the version correctly. And it's always fireplace-app

    $ ./gradlew printSemver -Psemver.stage=snapshot
    Type-safe project accessors is an incubating feature.
    
    > Task :fireplace-swt-experiment-app:printSemver
    semver for fireplace-swt-experiment-app: v0.0.1-SNAPSHOT
    
    > Task :fireplace-swing:printSemver
    semver for fireplace-swing: v0.0.1-SNAPSHOT
    
    > Task :fireplace-swt-awt-bridge:printSemver
    semver for fireplace-swt-awt-bridge: v0.0.1-SNAPSHOT
    
    > Task :fireplace-app:printSemver
    semver for fireplace-app: v0.1.0.0+62be628
    
    > Task :printSemver
    semver for fireplace: v0.0.1-SNAPSHOT
    
    > Task :fireplace-swing-animation:printSemver
    semver for fireplace-swing-animation: v0.0.1-SNAPSHOT
    
    

    So basically the code is like that

    The commit is here: https://github.com/bric3/fireplace/pull/137/commits/a6e24fc18f7d186c46251c0909fce09ceec244c9

    opened by bric3 7
  • strange warning about project not being in a git repository?

    strange warning about project not being in a git repository?

    doesn't appear to impact anything but does print a warning in this multi-module project

    > Task :config-versioning:generatePrecompiledScriptPluginAccessors
    semver plugin can't work if the project is not a git repository <============== HERE
    
    > Task :config-versioning:compileKotlin
    w: Language version 1.4 is deprecated and its support will be removed in a future version of Kotlin
    
    BUILD SUCCESSFUL in 9s
    81 actionable tasks: 40 executed, 41 up-to-date
    
    gradle-plugins on  main [!] via ☕ v11.0.13 via 🅺 on ☁️  (us-west-2) on ☁️ xxx(us-east1) took 9s 
    ❯ git status
    On branch main
    Your branch is up to date with 'origin/main'.
    
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git restore <file>..." to discard changes in working directory)
    	modified:   .github/workflows/pushpr.yaml
    	modified:   config-versioning/build.gradle.kts
    	modified:   config-versioning/src/main/kotlin/com.xxx.gradle.config-versioning.gradle.kts
    
    no changes added to commit (use "git add" and/or "git commit -a")
    
    opened by peterfigure 5
  • Update dependency com.javiersc.hubdle to v0.2.0-alpha.35

    Update dependency com.javiersc.hubdle to v0.2.0-alpha.35

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.javiersc.hubdle | 0.2.0-alpha.29 -> 0.2.0-alpha.35 | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Release Notes

    JavierSegoviaCordoba/hubdle

    v0.2.0-alpha.35

    Compare Source

    Fixed
    • coverage doesn't generate merged reports

    v0.2.0-alpha.34

    Compare Source

    Updated
    • com.javiersc.gradle:gradle-test-extensions -> 1.0.0-alpha.27
    • com.javiersc.gradle:gradle-extensions -> 1.0.0-alpha.27
    • org.eclipse.jgit:org.eclipse.jgit -> 6.3.0.202209071007-r
    • androidx.appcompat:appcompat -> 1.5.1
    • org.jetbrains.kotlinx:binary-compatibility-validator -> 0.11.1
    • androidx.core:core-ktx -> 1.9.0
    • com.squareup.moshi:moshi -> 1.14.0
    • io.ktor:ktor-serialization-kotlinx-json -> 2.1.1
    • io.ktor:ktor-client-okhttp -> 2.1.1
    • io.ktor:ktor-client-mock -> 2.1.1
    • io.ktor:ktor-client-core -> 2.1.1
    • io.ktor:ktor-client-content-negotiation -> 2.1.1
    • io.ktor:ktor-client-cio -> 2.1.1
    • org.jetbrains.intellij.plugins:gradle-intellij-plugin -> 1.9.0
    • org.jetbrains.compose:compose-gradle-plugin -> 1.2.0-alpha01-dev774
    • org.jetbrains.kotlinx:kover -> 0.6.0
    • com.diffplug.spotless:spotless-plugin-gradle -> 6.10.0
    • gradle/gradle-build-action -> v2.2.5
    • org.jetbrains.kotlinx:kotlinx-serialization-json -> 1.4.0
    • org.jetbrains.kotlinx:kotlinx-serialization-core -> 1.4.0
    • io.kotest:kotest-runner-junit5 -> 5.4.2
    • io.kotest:kotest-runner-junit4 -> 5.4.2
    • io.kotest:kotest-property -> 5.4.2
    • io.kotest:kotest-assertions-sql -> 5.4.2
    • io.kotest:kotest-assertions-json -> 5.4.2
    • io.kotest:kotest-assertions-core -> 5.4.2
    • com.gradle.enterprise:com.gradle.enterprise.gradle.plugin -> 3.11.1
    • gradle -> 7.5.1
    • com.android.tools.build:gradle -> 7.2.2
    • io.kotest.extensions:kotest-extensions-testcontainers -> 1.3.4
    • app.cash.turbine:turbine -> 0.9.0
    • io.kotest.extensions:kotest-extensions-spring -> 1.1.2
    • org.jetbrains.dokka:dokka-gradle-plugin -> 1.7.10
    • org.jetbrains.kotlin:kotlin-gradle-plugin -> 1.7.10
    • androidx.activity:activity-ktx -> 1.5.1
    • androidx.activity:activity-compose -> 1.5.1

    v0.2.0-alpha.33

    Compare Source

    Changed
    • InstallPreCommitTask header text
    Fixed
    • com.javiersc.mokoki:mokoki-core -> com.javiersc.mokoki:mokoki
    Updated
    • io.kotest:kotest-property -> 5.4.0
    • io.kotest:kotest-assertions-core -> 5.4.0

    v0.2.0-alpha.32

    Compare Source

    Added
    • com.squareup.okhttp3:mockwebserver3-junit4 dependency
    • com.squareup.okhttp3:mockwebserver3-junit5 dependency
    Fixed
    • ktor version

    v0.2.0-alpha.31

    Compare Source

    Added
    • javierscKotlinxCoroutinesRunBlocking() dependencies
    • javierscKotlinxCoroutinesRunBlockingAll() dependencies
    Fixed
    • ReadmeBadgesExtension is not using the real projectKey property if it exists

    v0.2.0-alpha.30

    Compare Source

    Added
    • publishToMavenLocalTest and publishToMavenLocalBuildTest tasks if the repositories exist
    • mavenLocalTest and mavenLocalBuildTest repositories
    • Hubdle prefix to all config extension classes
    • repositories to HubdlePublishingExtension
    Fixed
    • publishAllPublicationsToMavenLocalTestRepository is signed
    • being able to sign non semver artifacts
    Updated
    • gradle/gradle-build-action -> v2.2.2

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency com.javiersc.hubdle to v0.2.0-alpha.14

    Update dependency com.javiersc.hubdle to v0.2.0-alpha.14

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.javiersc.hubdle | 0.2.0-alpha.13 -> 0.2.0-alpha.17 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update javierscGradleExtensions to v1.0.0-alpha.14

    Update javierscGradleExtensions to v1.0.0-alpha.14

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.javiersc.gradle-extensions:gradle-testkit-ext | 1.0.0-alpha.13 -> 1.0.0-alpha.18 | age | adoption | passing | confidence | | com.javiersc.gradle-extensions:gradle-ext | 1.0.0-alpha.13 -> 1.0.0-alpha.18 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    🔕 Ignore: Close this PR and you won't be reminded about these updates again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext to v1.1.5

    Update dependency gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext to v1.1.5

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext | 1.1.4 -> 1.1.5 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency com.javiersc.gradle-plugins:all-plugins to v0.1.0-rc.45

    Update dependency com.javiersc.gradle-plugins:all-plugins to v0.1.0-rc.45

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.javiersc.gradle-plugins:all-plugins | 0.1.0-rc.43 -> 0.1.0-rc.45 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency io.kotest:kotest-assertions-core to v5.3.1

    Update dependency io.kotest:kotest-assertions-core to v5.3.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | io.kotest:kotest-assertions-core | 5.3.0 -> 5.3.2 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency com.android.application:com.android.application.gradle.plugin to v7.2.1

    Update dependency com.android.application:com.android.application.gradle.plugin to v7.2.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.android.application:com.android.application.gradle.plugin (source) | 7.2.0 -> 7.2.1 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Update dependency org.eclipse.jgit:org.eclipse.jgit to v6.4.0.202211300538-r

    Update dependency org.eclipse.jgit:org.eclipse.jgit to v6.4.0.202211300538-r

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | org.eclipse.jgit:org.eclipse.jgit | 6.3.0.202209071007-r -> 6.4.0.202211300538-r | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Never, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Update dependency com.javiersc.hubdle to v0.2.0-alpha.46

    Update dependency com.javiersc.hubdle to v0.2.0-alpha.46

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.javiersc.hubdle | 0.2.0-alpha.44 -> 0.2.0-alpha.46 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Never, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Adding some APIs

    Adding some APIs

    In my build script depending, I wrote some tasks that depends on the computed version, and some on the old version.

    Typically choosing the repository to upload artifacts weather the version is a snapshot or a release (alpha, beta, rc, final). In another project I'm working on there's the concept of EAP (early access preview). Currently I have created my own functions that parse the version. But it would be useful if the plugin could provide those.

    E.g.

    fun isSnapshot(version: Any) = version.toString().endsWith("-SNAPSHOT") 
            || version.toString().matches(Regex(".*\\.\\d+\\+[0-9a-f]+")) // .54+6a08d70
    

    Another thing that I'm currently doing differently is getting the last tag (and possibly the commit id), which could be used to trigger some tasks.

    enhancement 
    opened by bric3 4
  • Run `semverPrint` when IntelliJ syncs

    Run `semverPrint` when IntelliJ syncs

    Plugin: https://github.com/JetBrains/gradle-idea-ext-plugin

    Relevant docs: https://github.com/JetBrains/gradle-idea-ext-plugin/wiki#gradle-tasks-triggers-settings

    Blocked by https://youtrack.jetbrains.com/issue/IDEA-296268/Gradle-IDEA-Ext-and-allprojects-usage

    blocked 
    opened by JavierSegoviaCordoba 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    This repository currently has no open or pending branches.

    Detected dependencies

    github-actions
    .github/workflows/apply-format.yaml
    .github/workflows/build-changelog-renovate-bot.yaml
    .github/workflows/build-kotlin-dispatcher.yaml
    .github/workflows/build-kotlin.yaml
    .github/workflows/generate-version-tag.yaml
    .github/workflows/publish-kotlin.yaml
    gradle
    gradle.properties
    settings.gradle.kts
    build.gradle.kts
    gradle/libs.versions.toml
    • com.javiersc.semver:semver-core 0.1.0-beta.12
    • org.eclipse.jgit:org.eclipse.jgit 6.4.0.202211300538-r
    • com.javiersc.hubdle 0.2.0-alpha.46
    semver-gradle-plugin/build.gradle.kts
    gradle-wrapper
    gradle/wrapper/gradle-wrapper.properties
    • gradle 7.6

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    dependency 
    opened by renovate[bot] 0
  • Releases(0.4.0-alpha.1)
    • 0.4.0-alpha.1(Jan 4, 2023)

      Changed

      • SNAPSHOT is treated now as non-special stage (higher than rc)

      Updated

      • org.eclipse.jgit:org.eclipse.jgit -> 6.4.0.202211300538-r
      • com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin -> 0.2.0-alpha.46
      • gradle -> 7.6

      Added

      • Project.isAlpha: Provider<Boolean> extension
      • Project.isNotAlpha: Provider<Boolean> extension
      • Project.isBeta: Provider<Boolean> extension
      • Project.isNotBeta: Provider<Boolean> extension
      • Project.isDev: Provider<Boolean> extension
      • Project.isNotDev: Provider<Boolean> extension
      • Project.isRC: Provider<Boolean> extension
      • Project.isNotRC: Provider<Boolean> extension
      • Project.isSnapshot: Provider<Boolean> extension
      • Project.isNotSnapshot: Provider<Boolean> extension
      Source code(tar.gz)
      Source code(zip)
    • 0.3.0-alpha.5(Nov 4, 2022)

      Added

      • semver.project.tagPrefix Gradle Project property to set tag prefix instead of using the property from the extension (SemverExtension::tagPrefix). If both are set, the first one has preference.

      Updated

      • com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin -> 0.2.0-alpha.43
      • org.eclipse.jgit:org.eclipse.jgit -> 6.3.0.202209071007-r
      • gradle -> 7.5.1
      Source code(tar.gz)
      Source code(zip)
    • 0.3.0-alpha.4(Jul 10, 2022)

    • 0.3.0-alpha.3(Jul 10, 2022)

    • 0.3.0-alpha.2(Jul 9, 2022)

      Changed

      • printSemver can't be cacheable

      Updated

      • com.javiersc.hubdle:com.javiersc.hubdle.gradle.plugin -> 0.2.0-alpha.18
      • org.jetbrains.kotlin:kotlin-gradle-plugin -> 1.7.10
      • com.android.application:com.android.application.gradle.plugin -> 7.2.1

      Added

      • githubEnv boolean option to PrintSemverTask
      • githubOutput boolean option to PrintSemverTask
      Source code(tar.gz)
      Source code(zip)
    • 0.3.0-alpha.1(Jul 3, 2022)

      Changed

      • printSemver name to printSemver.
      • semverCreateTag name to createSemverTag.
      • semverPushTag name to pushSemverTag.

      Updated

      • org.jetbrains.kotlinx:kotlinx-coroutines-core -> 1.6.3
      Source code(tar.gz)
      Source code(zip)
    • 0.2.0-alpha.2(Jun 18, 2022)

    • 0.2.0-alpha.1(Jun 14, 2022)

      ⚠️ THIS VERSION IS A BIG REFACTOR, CHECK ALL CHANGES THOROUGHLY ⚠️

      In order to support configuration cache and project isolation, the library has been refactored a lot

      The README and samples have been updated.

      Sorry for the inconvenience.

      Changed

      • the plugin must be applied individually to each project instead of only in the root project.
      • project.version is now a LazyVersion, to get the string use toString method.
      • createSemverTag name to semverCreateTag.
      • pushSemverTag name to semverPushTag and now it only pushes the tag.
      • semver.tagPrefix is no longer used to indicate a project version. Now it is used to filter which projects are going to bump the version based on it and the value in the property tagPrefix in the semver plugin extension.

      Added

      • semverPrint task which prints the version and generates the build/semver/version.txt.
      • semver plugin extension which has tagPrefix to indicate the project tag prefix.
      • configuration cache support
      • project isolation support

      Removed

      • applying the plugin to the root project only configures the root project and not all projects.
      • build/semver/version.txt is no longer generated in configuration phase.
      • the old way to change the version in multi-project builds (-PprojectName:semver.scope=patch").

      Updated

      • org.jetbrains.kotlinx:binary-compatibility-validator -> 0.10.1
      • org.eclipse.jgit:org.eclipse.jgit -> 6.2.0.202206071550-r
      • com.javiersc.kotlin:kotlin-stdlib -> 0.1.0-alpha.5
      • org.jetbrains.kotlinx:kotlinx-coroutines-core -> 1.6.2
      • com.javiersc.gradle-plugins:all-plugins -> 0.1.0-rc.43
      • io.kotest:kotest-assertions-core -> 5.3.0
      • org.jetbrains.kotlin:kotlin-gradle-plugin -> 1.6.21
      • gradle -> 7.4.2
      Source code(tar.gz)
      Source code(zip)
    • 0.1.0-alpha.10(Dec 18, 2021)

      Fixed

      • crash when the project has no commits

      Updated

      • com.javiersc.semver:semver-core -> 0.1.0-beta.10
      • gradle -> 7.3.2
      • org.jetbrains.kotlin:kotlin-gradle-plugin -> 1.6.10
      Source code(tar.gz)
      Source code(zip)
    • 0.1.0-alpha.9(Dec 13, 2021)

    • 0.1.0-alpha.8(Dec 10, 2021)

    • 0.1.0-alpha.7(Dec 10, 2021)

      Added

      • semver.checkClean Gradle property to allow versions without timestamp on dirty repositories
      • pushSemverTag can set a specific remote via semver.remote Gradle property

      Fixed

      • pushSemverTag
      • project can't sync if it is not a git repository

      Updated

      • com.javiersc.gradle-plugins:all-plugins -> 0.1.0-rc.22
      • gradle -> 7.3.1
      Source code(tar.gz)
      Source code(zip)
    • 0.1.0-alpha.6(Nov 30, 2021)

      Updated

      • io.kotest:kotest-assertions-core -> 5.0.1
      • com.javiersc.gradle-plugins:all-plugins -> 0.1.0-rc.19
      • com.javiersc.semver:semver-core -> 0.1.0-beta.8
      • com.javiersc.kotlin:kotlin-stdlib -> 0.1.0-alpha.3
      • org.eclipse.jgit:org.eclipse.jgit -> 6.0.0.202111291000-r
      Source code(tar.gz)
      Source code(zip)
    • 0.1.0-alpha.5(Nov 29, 2021)

    • 0.1.0-alpha.4(Nov 25, 2021)

      Fixed

      • getting all tags instead of only version tags
      • calculated version

      Updated

      • io.kotest:kotest-assertions-core -> 5.0.0
      • com.javiersc.gradle-plugins:all-plugins -> 0.1.0-rc.12
      Source code(tar.gz)
      Source code(zip)
    • 0.1.0-alpha.1(Nov 12, 2021)

    Gradle plugin to ease Kotlin IR plugin development and usage in multimodule gradle projects

    Gradle plugin to ease Kotlin IR plugin development and usage in multimodule gradle projects. Former: kotlin-ir-plugin-adapter-gradle

    null 2 Mar 8, 2022
    Kotlin Gradle plugins for conveniently setting up Kotlin projects (JVM/MPP), publishing, Dokka, etc

    Arrow Gradle config Add basic config to a Kotlin Multiplatform project In an Arrow KMP project, just add to the plugin block: plugins { kotlin("mu

    ΛRROW 8 Aug 3, 2022
    A Gradle plugin to ease testing in Kotlin Multiplatform projects.

    Multiplatform Testing Plugin A Gradle plugin for easy testing of Kotlin Multiplatform projects in your CI pipeline. Support for testing android() targ

    DeepMedia 6 Oct 19, 2022
    A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes.

    Change Tracker Plugin A Gradle plugin to help analyse the dependency between modules and run tasks only on modules impacted by specific set of changes

    Ismael Di Vita 110 Dec 19, 2022
    A Gradle Plugin to determine which modules were affected by a set of files in a commit.

    A Gradle Plugin to determine which modules were affected by a set of files in a commit. One use case for this plugin is for developers who would like to only run tests in modules which have changed in a given commit.

    Dropbox 491 Dec 23, 2022
    Gradle-i18n-plugin is meant for generating a JSON file with internationalized texts, based on a Google Sheet.

    Gradle-i18n-plugin Gradle-i18n-plugin is meant for generating a JSON file with internationalized texts, based on a Google Sheet. The plugin assumes th

    Acto ApS 2 Oct 11, 2021
    A Gradle plugin that generates plugin.yml for Bukkit/BungeeCord/Nukkit plugins based on the Gradle project

    plugin-yml is a simple Gradle plugin that generates the plugin.yml plugin description file for Bukkit plugins, bungee.yml for Bungee plugins or nukkit.yml for Nukkit plugins based on the Gradle project. Various properties are set automatically (e.g. project name, version or description) and additional properties can be added using a simple DSL.

    Plexus 0 Apr 10, 2022
    Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms.

    CompleteKotlin Gradle Plugin to enable auto-completion and symbol resolution for all Kotlin/Native platforms. What this plugin provides This zero-conf

    Louis CAD 235 Jan 3, 2023
    Gradle Plugin that allows you to decompile bytecode compiled with Jetpack Compose Compiler Plugin into Java and check it

    decomposer Gradle Plugin that allows you to decompile bytecode compiled with Jetpack Compose Compiler Plugin into Java and check it How to use Run bui

    Takahiro Menju 56 Nov 18, 2022
    Gradle Plugin to automatically upgrade your gradle project dependencies and send a GitHub pull request with the changes

    Gradle Plugin to automatically upgrade your gradle project dependencies and send a GitHub pull request with the changes

    Dipien 142 Dec 29, 2022
    Android Gradle Plugin -- Auto Check big image and compress image in building.

    McImage I will continue to update, please rest assured to use 中文文档 Android优雅的打包时自动化获取全部res资源 McImage is a Non-invasive plugin for compress all res in

    smallSohoSolo 1.1k Dec 28, 2022
    Gradle plugin that generates a Swift Package Manager manifest and an XCFramework to distribute a Kotlin Multiplatform library for Apple platforms.

    Multiplatform Swift Package This is a Gradle plugin for Kotlin Multiplatform projects that generates an XCFramework for your native Apple targets and

    Georg Dresler 262 Jan 5, 2023
    Gradle Plugin for publishing artifacts to Sonatype and Nexus

    Introduction Due to Sonatype's strict validation rules, the publishing requirement must be satisfied by every artifact which wants to be published to

    Johnson Lee 21 Oct 14, 2022
    Gradle plugin that parses version updates and assigns them to groups of people.

    Notifier Gradle Plugin This gradle plugin serves the need of automating how dependencies are handles in a project. More specifically, it functions usi

    Plum 4 Oct 27, 2022
    Useful and Fun plugins to use for Aliucord!

    ♥ Aliucord Plugins ♥ What do I need to use plugins ? To obtain Aliucord plugins (Plugins for Discord) make sure you have Aliucord installed! If you do

    Link 10 Sep 2, 2022
    How to write Gradle plugins - answers to common questions and alternative implementation solutions

    Gradle Plugins: Why? How? There is some misunderstanding and confusion about the concept of Plugins in Gradle. This is unfortunate, as it is one of th

    Jendrik Johannes 89 Dec 25, 2022
    Klinker is a gradle plugin making it possible to link kotlin native executables with custom linkers and options.

    Klinker is a gradle plugin making it possible to link kotlin native executables with custom linkers and options. It does this by creating a static library for kotlin compilation, then generates a c+kotlin wrapper that calls into kotlin to start the app, finally using the specified compiler to compile and link the c code and kotlin library into a binary.

    Jason Monk 4 Apr 14, 2022
    Gradle plugin to check, if rest-controllers are used by clients and clients have suitable rest-interfaces

    Verify-Feign Gradle Plugin This plugin will help you to verify all rest-clients and -controllers in a multimodule spring project. It will check, if al

    null 3 May 11, 2022
    The core Gradle plugin and associated logic used for Slack's Android app

    slack-gradle-plugin This repository contains the core Gradle plugin and associated logic used for Slack's Android app. This repo is effectively read-o

    Slack 306 Dec 30, 2022
    build.gradle.kts gradle.properties
    allprojects {
        group = "io.github.bric3.fireplace"
    
        apply(plugin = "com.javiersc.semver.gradle.plugin")
        semver {
            tagPrefix.set("v")
        }
    }
    
    semver.tagPrefix=v
    semver.checkClean=false