diff --git a/build.gradle b/build.gradle index 2fd87fc..3ddf6ab 100644 --- a/build.gradle +++ b/build.gradle @@ -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', { @@ -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 @@ -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' +} diff --git a/src/gradleTest/basicTest/build.gradle b/src/gradleTest/basicTest/build.gradle new file mode 100644 index 0000000..8ce7935 --- /dev/null +++ b/src/gradleTest/basicTest/build.gradle @@ -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 +} \ No newline at end of file diff --git a/src/gradleTest/basicTest/make.bat b/src/gradleTest/basicTest/make.bat new file mode 100644 index 0000000..7156f63 --- /dev/null +++ b/src/gradleTest/basicTest/make.bat @@ -0,0 +1,2 @@ +@echo off +echo %1 %2 %3 %4 55 %6 %7 %8 %9 \ No newline at end of file diff --git a/src/gradleTest/basicTest/make.sh b/src/gradleTest/basicTest/make.sh new file mode 100755 index 0000000..5af177a --- /dev/null +++ b/src/gradleTest/basicTest/make.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +echo $@ diff --git a/src/main/groovy/org/ysb33r/gradle/gnumake/GnuMakeBuild.groovy b/src/main/groovy/org/ysb33r/gradle/gnumake/GnuMakeBuild.groovy index 096c0df..b81f588 100644 --- a/src/main/groovy/org/ysb33r/gradle/gnumake/GnuMakeBuild.groovy +++ b/src/main/groovy/org/ysb33r/gradle/gnumake/GnuMakeBuild.groovy @@ -97,6 +97,7 @@ class GnuMakeBuild extends DefaultTask { */ @Input @Optional + @CompileDynamic List getTargets() { CollectionUtils.stringize(this.targets) } @@ -162,6 +163,7 @@ class GnuMakeBuild extends DefaultTask { * on the GnuMake class. */ @Input + @CompileDynamic @Optional List getSwitches() { CollectionUtils.stringize(this.switches)