Created
May 28, 2019 05:59
-
-
Save hakanai/16888087c40ff559127ecaccbd18a661 to your computer and use it in GitHub Desktop.
Reusing file sets in Gradle builds
This file contains 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
def commonCrap = copySpec { | |
from('dir1') { | |
include '**/*.jar' | |
} | |
from('dir2') { | |
include '**/*.dll' | |
} | |
} | |
task copy1(type: Copy) { | |
into "${buildDir}/copy1" | |
with commonCrap | |
} | |
task copy2(type: Copy) { | |
into "${buildDir}/copy2" | |
with commonCrap | |
} | |
task zip3(type: Zip) { | |
archiveFile = "${buildDir}/blah.zip" | |
with commonCrap | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment