Skip to content

Commit

Permalink
Support for makeInputs & makeOutputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ysb33r committed Apr 25, 2015
1 parent 7d123a1 commit de15a54
Show file tree
Hide file tree
Showing 10 changed files with 634 additions and 234 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## Version 1.0 - Roadmap
- A default task called `make` is added when the plugin is applied.
- Add file monitors for input or output so that Gradle will known when to run the `make` tasks
- DSL improvements
- Add rules such that `gradle makeClean` will run `make clean`
- If you do `:a:b:c:makeClean` Gradle will execute the `make` task in `a/b/c`.
- If no Makefile is provided, Gradle will look for Makefile in the same directory

## Version 0.3
- Add `gnumake` extension

Expand Down
36 changes: 28 additions & 8 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ the *switches* property.
* 0.0.2 - Gradle 1.6


== Supported Properties
The following properties are supported:
== Supported Attributes
The following attributes are supported:

[cols="4*"]
|===
Expand All @@ -40,10 +40,14 @@ The following properties are supported:
| `switches` | list | | Arbitrary list of switches to pass to make.
| `executable` | string | | Location of make executable, defaults to 'make'
| `workingDir` | string | | location where to start make from (not the same as *chDir*)
| `tasks` | list | | Alias for targets.
|===

== Synopsis
== Deprecated Attributes

| `tasks` | list | | Alias for targets.

== Usage

[source,groovy]
----
Expand All @@ -52,15 +56,29 @@ buildscript {
jcenter()
}
dependencies {
classpath 'org.ysb33r.gradle:gnumake:0.3'
classpath 'org.ysb33r.gradle:gnumake:1.0'
}
}
apply plugin : 'org.ysb33r.gnumake'
make {
targets 'build','install'
flags DESTDIR : '/copy/files/here', BUILD_NUMBER : '12345'
}
----

Additional tasks can be created and configured

[source,groovy]
----
import org.ysb33r.gradle.gnumake.GnuMakeBuild
task runMake (type:GnuMakeBuild) {
targets = ['build','install']
flags = [ DESTDIR : '/copy/files/here', BUILD_NUMBER : 12345 ]
targets 'build','install'
flags DESTDIR : '/copy/files/here', BUILD_NUMBER : '12345'
}
----

Expand All @@ -71,7 +89,9 @@ It is also possible to set the executable and makefile name globally for all tas
gnumake {
executable = 'gmake'
makefile = 'OurOwnMakefileConvention'
defaultFlags BUILD_NUMBER : '12345'
}
----

If the above two are not set in a task it will take the value from the global configuration.
Tasks will default to `executable` and `makefile` if not set. `defaultFlags` will be added to the existing flags on
the task unless the `defaultFlags` property on the task is set to `false`.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ apply plugin : 'com.jfrog.artifactory'
apply plugin : 'com.github.hierynomus.license'
group = 'org.ysb33r.gradle'
archivesBaseName = 'gnumake'
version = '0.3'
version = '1.0-SNAPSHOT'

sourceCompatibility = 1.6
targetCompatibility = 1.6

Expand All @@ -46,7 +47,7 @@ repositories {
dependencies {
compile gradleApi()
compile localGroovy()
testCompile ('org.spockframework:spock-core:0.7-groovy-2.0') {
testCompile ('org.spockframework:spock-core:1.0-groovy-2.3') {
exclude module : 'groovy-all'
}
}
Expand Down
Loading

0 comments on commit de15a54

Please sign in to comment.