-
-
Save ysb33r/9f95bab338b912c45986 to your computer and use it in GitHub Desktop.
Faking Repositories in Gradle
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
repositories { | |
ivy { | |
url 'http://somewhere.example/root' | |
layout ('pattern') { | |
artifact '[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])' | |
} | |
} | |
} |
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
$ gradle -btryIt.gradle --info tryIt | |
Starting Build | |
Settings evaluated using empty settings script. | |
Projects loaded. Root project using build file '/home/me/tryIt.gradle'. | |
Included projects: [root project 'me'] | |
Evaluating root project 'me' using build file '/home/me/tryIt.gradle'. | |
Compiling build file '/home/me/tryIt.gradle' using StatementExtractingScriptTransformer. | |
Compiling build file '/home/me/tryIt.gradle' using BuildScriptTransformer. | |
All projects evaluated. | |
Selected primary task 'DefaultTaskParameter{taskName='tryIt',projectPath='null'}' | |
Tasks to be executed: [task ':tryIt'] | |
:hello (Thread[main,5,main]) started. | |
:hello | |
Executing task ':tryIt' (up-to-date check took 0.002 secs) due to: | |
Task has not declared any outputs. | |
Resource missing. [HTTP GET: http://download.sourceforge.net/project/libusb/libusb-1.0/ivy-1.0.19/ivy-1.0.19.xml] | |
Download http://download.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.19/libusb-1.0.19.tar.bz2 | |
[/home/me/.gradle/caches/modules-2/files-2.1/libusb/libusb/1.0.19/c5d14ced155233ceeb5107c7eb3b94b16649ae05/libusb-1.0.19.tar.bz2] | |
:me (Thread[main,5,main]) completed. Took 4.055 secs. |
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
repositories { | |
ivy { | |
url 'http://download.sourceforge.net/project' | |
layout ('pattern') { | |
artifact '[organisation]/[module]-1.0/[artifact]-[revision]/[artifact]-[revision].[ext]' | |
} | |
} | |
} |
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
repositories { | |
ivy { | |
url 'http://download.sourceforge.net/project' | |
layout ('pattern') { | |
artifact '[organisation]/[module]-1.0/[artifact]-[revision]/[artifact]-[revision].[ext]' | |
} | |
} | |
} | |
configurations { | |
foo | |
} | |
dependencies { | |
foo 'libusb:libusb:1.0.19@tar.bz2' | |
} | |
task tryIt << { | |
println configurations.foo.files | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not quite getting how to link this to
gem ':asciidoctor-bespoke:0@gem'
. What do I do after Gradle downloads the Ivy dependency?