Skip to content

Commit

Permalink
Merge pull request #26 from rspieldenner/gradle2.6
Browse files Browse the repository at this point in the history
Move to gradle 2.6, add matrix testing
  • Loading branch information
rspieldenner committed Aug 21, 2015
2 parents 9cbbd4c + b8babd9 commit 04c46c6
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 40 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ script: "./buildViaTravis.sh"
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/dists/gradle-2.4-bin/"
before_install:
- test $TRAVIS_PULL_REQUEST = false && openssl aes-256-cbc -K $encrypted_90ab3804b7e3_key -iv $encrypted_90ab3804b7e3_iv -in gradle.properties.enc -out gradle.properties -d || true
after_success:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
3.1.0 / 2015-08-21
==================

* switch publication to be nebula instead of mavenNebula
* move to gradle 2.6
* move to nebula.release version 2.2.7

3.0.5 / 2015-08-17
==================

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Gradle Compatibility Tested
| Gradle Version | Works |
| -------------- | ----- |
| 2.2.1 | yes |
| 2.3 | ?? |
| 2.3 | yes |
| 2.4 | yes |
| 2.5 | ?? |
| 2.6 | ?? |
| 2.5 | yes |
| 2.6 | yes |

LICENSE
=======
Expand Down
37 changes: 16 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:nebula-bintray-plugin:2.2.4'
}
}

plugins {
id 'groovy'
id 'idea'
Expand All @@ -18,13 +8,13 @@ plugins {
id 'nebula.source-jar' version '3.0.2'
id 'nebula.info' version '2.2.4'
id 'nebula.contacts' version '2.2.0'
id 'nebula.nebula-release' version '2.2.6'
id 'nebula.nebula-release' version '2.2.7'
id 'nebula.nebula-bintray' version '3.0.0'
id 'com.gradle.plugin-publish' version '0.9.1'
id 'com.github.kt3k.coveralls' version '2.4.0'
id 'org.ysb33r.gradletest' version '0.5.4'
}

apply plugin: 'nebula.nebula-bintray'

description 'Gradle plugin to setup nebula-plugin'

group = 'com.netflix.nebula'
Expand All @@ -50,11 +40,12 @@ repositories {
dependencies {
compile localGroovy()
compile gradleApi()
compile 'com.netflix.nebula:nebula-bintray-plugin:2.2.+'
compile 'com.netflix.nebula:nebula-release-plugin:2.2.+'
compile 'com.netflix.nebula:nebula-core:2.2.0'
compile 'com.netflix.nebula:nebula-bintray-plugin:3.0.0'
compile 'com.netflix.nebula:nebula-release-plugin:2.2.7'
compile 'org.ajoberstar:gradle-git' // using these but just want the version used by nebula-release-plugin
testCompile 'org.ajoberstar:grgit'
testCompile('com.netflix.nebula:nebula-test:2.2.+') {
testCompile('com.netflix.nebula:nebula-test:3.0.0') {
exclude group: 'org.codehaus.groovy'
}
}
Expand Down Expand Up @@ -85,11 +76,6 @@ pluginBundle {
}
}

// while using 2.2.x branch of nebula-bintray-plugin, and 3.x of nebula-publishing-plugin need to configure publication
bintray {
publications = ['nebula']
}

// Wire up build and publishing process
project.tasks.getByName('verifyReleaseStatus').actions.clear()
project.tasks.getByName('verifySnapshotStatus').actions.clear()
Expand Down Expand Up @@ -130,3 +116,12 @@ if (project.hasProperty('release.travisci') && project.property('release.travisc
addReleaseBranchPattern(/gradle-\d+\.\d+/)
}
}

gradleTest {
versions '2.2.1', '2.3', '2.4', '2.5', '2.6'
}

gradleTest.dependsOn(jar)
gradleTest.doFirst {
project.version = project.version.toString()
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jun 03 16:48:14 PDT 2014
#Fri Aug 21 09:58:28 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
24 changes: 24 additions & 0 deletions src/gradleTest/simplePlugin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
buildscript {
repositories { jcenter() }
dependencies {
classpath ':nebula-plugin-plugin:%%VERSION%%'
classpath 'com.netflix.nebula:nebula-core:2.2.0'
classpath 'com.netflix.nebula:nebula-bintray-plugin:3.0.0'
classpath 'com.netflix.nebula:nebula-release-plugin:2.2.7'
}
}

plugins {
id 'groovy'
id 'nebula.maven-publishing' version '3.0.2'
id 'nebula.javadoc-jar' version '3.0.2'
id 'nebula.source-jar' version '3.0.2'
}

import org.ajoberstar.grgit.Grgit
def grgit = Grgit.init(dir: '.')
grgit.commit(message: 'initial commit')

apply plugin: 'nebula.plugin-plugin'

task runGradleTest()
31 changes: 18 additions & 13 deletions src/main/groovy/nebula/plugin/plugin/NebulaPluginPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package nebula.plugin.plugin

import nebula.core.ProjectType
import nebula.plugin.bintray.BintrayPlugin
import nebula.plugin.release.ReleaseExtension
import nebula.plugin.release.ReleasePlugin
Expand Down Expand Up @@ -44,7 +45,7 @@ class NebulaPluginPlugin implements Plugin<Project> {

project.tasks.matching { it.name == 'bintrayUpload' || it.name == 'artifactoryPublish'}.all { Task task ->
task.mustRunAfter('build')
project.tasks.release.dependsOn(task)
project.rootProject.tasks.release.dependsOn(task)
}

project.tasks.matching { it.name == 'bintrayUpload' }.all { Task task ->
Expand All @@ -63,19 +64,23 @@ class NebulaPluginPlugin implements Plugin<Project> {
}
}

ReleasePluginExtension releaseExtension = project.extensions.findByType(ReleasePluginExtension)
releaseExtension.with {
defaultVersionStrategy = nebula.plugin.release.NetflixOssStrategies.SNAPSHOT
}
ProjectType type = new ProjectType(project)

if (type.isRootProject) {
ReleasePluginExtension releaseExtension = project.extensions.findByType(ReleasePluginExtension)
releaseExtension.with {
defaultVersionStrategy = nebula.plugin.release.NetflixOssStrategies.SNAPSHOT
}

if (project.hasProperty('release.travisci') && project.property('release.travisci').toBoolean()) {
project.tasks.release.deleteAllActions()
project.tasks.prepare.deleteAllActions()
ReleaseExtension nebulaRelease = project.extensions.findByType(ReleaseExtension)
nebulaRelease.with {
addReleaseBranchPattern(/HEAD/)
addReleaseBranchPattern(/v?\d+\.\d+\.\d+/)
addReleaseBranchPattern(/gradle-\d+\.\d+/)
if (project.hasProperty('release.travisci') && project.property('release.travisci').toBoolean()) {
project.tasks.release.deleteAllActions()
project.tasks.prepare.deleteAllActions()
ReleaseExtension nebulaRelease = project.extensions.findByType(ReleaseExtension)
nebulaRelease.with {
addReleaseBranchPattern(/HEAD/)
addReleaseBranchPattern(/v?\d+\.\d+\.\d+/)
addReleaseBranchPattern(/gradle-\d+\.\d+/)
}
}
}
}
Expand Down

0 comments on commit 04c46c6

Please sign in to comment.