Created
August 26, 2014 18:34
-
-
Save neversleepz/10a8b293197a3ee643da to your computer and use it in GitHub Desktop.
Inplace html files that swap out version numbers but still allow gradle to keep up to date checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'jetty' | |
sourceCompatibility = 1.8 | |
version = '1.0' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
testCompile group: 'junit', name: 'junit', version: '4.11' | |
} | |
war { | |
expand([version: version]) | |
duplicatesStrategy DuplicatesStrategy.FAIL | |
} | |
task warList(dependsOn: war) << { | |
def tree= zipTree(war.archivePath); | |
tree.each { println it; if (it.name == 'index.html') { println it.toPath().readLines().toString() } } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to be specific about which files are expanded you can use