Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
updates applied plugins to their latest version (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joaquimmnetto authored Jul 19, 2023
1 parent d3e1197 commit 1c342da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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['
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Project> {

Expand Down Expand Up @@ -51,8 +51,8 @@ class PrivatePluginsPlugin implements Plugin<Project> {
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)
}
}

Expand Down
16 changes: 8 additions & 8 deletions src/test/groovy/wooga/gradle/plugins/PluginsPluginSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"() {
Expand All @@ -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"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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"() {
Expand All @@ -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"() {
Expand Down

0 comments on commit 1c342da

Please sign in to comment.