diff --git a/build.gradle b/build.gradle index 0e7e9fa..87cfb27 100644 --- a/build.gradle +++ b/build.gradle @@ -21,9 +21,9 @@ buildscript { } dependencies { classpath 'com.wooga.gradle:gradle-commons:[1,2[' - classpath 'net.wooga.gradle:github:[3,4[' - classpath 'net.wooga.gradle:github-release-notes:[2,3[' - classpath 'net.wooga.gradle:version:[2,3[' + classpath 'net.wooga.gradle:github:[4,5[' + classpath 'net.wooga.gradle:github-release-notes:[3,4[' + classpath 'net.wooga.gradle:version:[3,4[' classpath 'com.gradle.publish:plugin-publish-plugin:0.14.0' classpath 'org.ajoberstar.grgit:grgit-gradle:[4.1.1,5[' classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0' @@ -86,11 +86,11 @@ repositories { dependencies { implementation 'com.wooga.gradle:gradle-commons:[1,2[' - implementation 'net.wooga.gradle:github:[3,4[' - implementation ('net.wooga.gradle:github-release-notes:[2,3[', { + implementation 'net.wooga.gradle:github:[4,5[' + implementation ('net.wooga.gradle:github-release-notes:[3,4[', { exclude group: "org.codehaus.groovy" }) - implementation 'net.wooga.gradle:version:[2,3[' + implementation 'net.wooga.gradle:version:[3,4[' implementation 'com.gradle.publish:plugin-publish-plugin:0.14.0' implementation 'org.ajoberstar.grgit:grgit-gradle:[4.1.1,5[' implementation 'org.ajoberstar.grgit:grgit-core:[4.1.1,5[' diff --git a/src/main/groovy/wooga/gradle/plugins/PrivatePluginsPlugin.groovy b/src/main/groovy/wooga/gradle/plugins/PrivatePluginsPlugin.groovy index 8c66ee0..fb38c20 100644 --- a/src/main/groovy/wooga/gradle/plugins/PrivatePluginsPlugin.groovy +++ b/src/main/groovy/wooga/gradle/plugins/PrivatePluginsPlugin.groovy @@ -19,10 +19,10 @@ import wooga.gradle.githubReleaseNotes.GithubReleaseNotesPlugin import wooga.gradle.githubReleaseNotes.tasks.GenerateReleaseNotes import wooga.gradle.plugins.releasenotes.ReleaseNotesStrategy import wooga.gradle.plugins.sonarqube.SonarQubeConfiguration -import wooga.gradle.version.VersionCodeScheme +import wooga.gradle.version.VersionCodeSchemes import wooga.gradle.version.VersionPlugin import wooga.gradle.version.VersionPluginExtension -import wooga.gradle.version.VersionScheme +import wooga.gradle.version.VersionSchemes class PrivatePluginsPlugin implements Plugin { @@ -51,8 +51,8 @@ class PrivatePluginsPlugin implements Plugin { private static void configureVersionPlugin(Project project) { def versionExt = project.extensions.findByType(VersionPluginExtension) if (versionExt) { - versionExt.versionScheme.set(VersionScheme.semver2) - versionExt.versionCodeScheme.set(VersionCodeScheme.releaseCount) + versionExt.versionScheme.set(VersionSchemes.semver2) + versionExt.versionCodeScheme.set(VersionCodeSchemes.releaseCount) } } diff --git a/src/test/groovy/wooga/gradle/plugins/PluginsPluginSpec.groovy b/src/test/groovy/wooga/gradle/plugins/PluginsPluginSpec.groovy index 5900194..09d8675 100644 --- a/src/test/groovy/wooga/gradle/plugins/PluginsPluginSpec.groovy +++ b/src/test/groovy/wooga/gradle/plugins/PluginsPluginSpec.groovy @@ -44,10 +44,10 @@ import wooga.gradle.github.publish.GithubPublishPlugin import wooga.gradle.github.publish.tasks.GithubPublish import wooga.gradle.githubReleaseNotes.GithubReleaseNotesPlugin import wooga.gradle.githubReleaseNotes.tasks.GenerateReleaseNotes -import wooga.gradle.version.VersionCodeScheme +import wooga.gradle.version.VersionCodeSchemes import wooga.gradle.version.VersionPlugin import wooga.gradle.version.VersionPluginExtension -import wooga.gradle.version.VersionScheme +import wooga.gradle.version.VersionSchemes //TODO: this should extend PrivatePluginsPluginSpec? class PluginsPluginSpec extends ProjectSpec { @@ -266,9 +266,9 @@ class PluginsPluginSpec extends ProjectSpec { VersionPluginExtension versionExt = project.extensions.getByType(VersionPluginExtension) versionExt != null and: "Version scheme to be semver2" - versionExt.versionScheme.get() == VersionScheme.semver2 + versionExt.versionScheme.get() == VersionSchemes.semver2 and: "Version code scheme to be releaseCount" - versionExt.versionCodeScheme.get() == VersionCodeScheme.releaseCount + versionExt.versionCodeScheme.get() == VersionCodeSchemes.releaseCount } def "override version extension default values with custom ones"() { @@ -279,12 +279,12 @@ class PluginsPluginSpec extends ProjectSpec { VersionPluginExtension versionExt = project.extensions.getByType(VersionPluginExtension) when: "setting extension properties to distinct values" - versionExt.versionScheme("staticMarker") - versionExt.versionCodeScheme("releaseCountBasic") + versionExt.versionScheme.set(VersionSchemes.staticMarker) + versionExt.versionCodeScheme.set(VersionCodeSchemes.releaseCountBasic) then: "values should be the ones that has been set" - versionExt.versionScheme.get() == VersionScheme.staticMarker - versionExt.versionCodeScheme.get() == VersionCodeScheme.releaseCountBasic + versionExt.versionScheme.get() == VersionSchemes.staticMarker + versionExt.versionCodeScheme.get() == VersionCodeSchemes.releaseCountBasic } def "configures github publish task"() { diff --git a/src/test/groovy/wooga/gradle/plugins/PrivatePluginsPluginSpec.groovy b/src/test/groovy/wooga/gradle/plugins/PrivatePluginsPluginSpec.groovy index b40945d..f13fba7 100644 --- a/src/test/groovy/wooga/gradle/plugins/PrivatePluginsPluginSpec.groovy +++ b/src/test/groovy/wooga/gradle/plugins/PrivatePluginsPluginSpec.groovy @@ -16,9 +16,11 @@ import wooga.gradle.githubReleaseNotes.GithubReleaseNotesPlugin import wooga.gradle.githubReleaseNotes.tasks.GenerateReleaseNotes import wooga.gradle.plugins.releasenotes.ReleaseNotesStrategy import wooga.gradle.version.VersionCodeScheme +import wooga.gradle.version.VersionCodeSchemes import wooga.gradle.version.VersionPlugin import wooga.gradle.version.VersionPluginExtension import wooga.gradle.version.VersionScheme +import wooga.gradle.version.VersionSchemes class PrivatePluginsPluginSpec extends LocalPluginsPluginSpec { @@ -111,9 +113,9 @@ class PrivatePluginsPluginSpec extends LocalPluginsPluginSpec { VersionPluginExtension versionExt = project.extensions.getByType(VersionPluginExtension) versionExt != null and: "Version scheme to be semver2" - versionExt.versionScheme.get() == VersionScheme.semver2 + versionExt.versionScheme.get() == VersionSchemes.semver2 and: "Version code scheme to be releaseCount" - versionExt.versionCodeScheme.get() == VersionCodeScheme.releaseCount + versionExt.versionCodeScheme.get() == VersionCodeSchemes.releaseCount } def "override version extension default values with custom ones"() { @@ -128,8 +130,8 @@ class PrivatePluginsPluginSpec extends LocalPluginsPluginSpec { versionExt.versionCodeScheme("releaseCountBasic") then: "values should be the ones that has been set" - versionExt.versionScheme.get() == VersionScheme.staticMarker - versionExt.versionCodeScheme.get() == VersionCodeScheme.releaseCountBasic + versionExt.versionScheme.get() == VersionSchemes.staticMarker + versionExt.versionCodeScheme.get() == VersionCodeSchemes.releaseCountBasic } def "configures release notes plugin"() {