Skip to content

Commit

Permalink
Added gradleTest for compatibility testing and fixe dthe incompatibil…
Browse files Browse the repository at this point in the history
…ity with Gradle 2.2/2.3
  • Loading branch information
ysb33r committed May 5, 2015
1 parent 4c1c753 commit 95f9015
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ buildscript {
classpath 'org.ysb33r.gradle:bintray:1.5'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.1.0'
classpath "com.gradle.publish:plugin-publish-plugin:0.9.0"
classpath 'org.ysb33r.gradle:gradletest:0.5'

// See: https://github.com/hierynomus/license-gradle-plugin/issues/67
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0', {
Expand All @@ -36,10 +37,11 @@ apply plugin : 'maven'
apply plugin : 'com.jfrog.artifactory'
apply plugin : 'com.gradle.plugin-publish'
apply plugin : 'com.github.hierynomus.license'
apply plugin : 'org.ysb33r.gradletest'

group = 'org.ysb33r.gradle'
archivesBaseName = 'gnumake'
version = '1.0'
version = '1.0.1'

sourceCompatibility = 1.6
targetCompatibility = 1.6
Expand Down Expand Up @@ -155,3 +157,11 @@ license {
ext.year = '2013-2015'
excludes(['**/*.ad', '**/*.asciidoc', '**/*.adoc', '**/*.md','**/*.properties'])
}

gradleLocations {
downloadToGradleUserHome = true
}

gradleTest {
versions '2.0','2.2','2.3'
}
17 changes: 17 additions & 0 deletions src/gradleTest/basicTest/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import org.gradle.internal.os.OperatingSystem

buildscript {
dependencies {
classpath 'org.ysb33r.gradle:gnumake:%%VERSION%%'
}
}

apply plugin : 'org.ysb33r.gnumake'

gnumake {
executable "${projectDir}/${OperatingSystem.current().isWindows() ? 'make.bat' : 'make.sh'}"
}

task runGradleTest {
dependsOn makeClean
}
2 changes: 2 additions & 0 deletions src/gradleTest/basicTest/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
echo %1 %2 %3 %4 55 %6 %7 %8 %9
2 changes: 2 additions & 0 deletions src/gradleTest/basicTest/make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
echo $@
2 changes: 2 additions & 0 deletions src/main/groovy/org/ysb33r/gradle/gnumake/GnuMakeBuild.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class GnuMakeBuild extends DefaultTask {
*/
@Input
@Optional
@CompileDynamic
List<String> getTargets() {
CollectionUtils.stringize(this.targets)
}
Expand Down Expand Up @@ -162,6 +163,7 @@ class GnuMakeBuild extends DefaultTask {
* on the GnuMake class.
*/
@Input
@CompileDynamic
@Optional
List<String> getSwitches() {
CollectionUtils.stringize(this.switches)
Expand Down

0 comments on commit 95f9015

Please sign in to comment.