Skip to content

Commit f2cd083

Browse files
authored
Update build.gradle
added buildscript to offline build
1 parent 12ac411 commit f2cd083

File tree

1 file changed

+16
-2
lines changed
  • examples/disconnected-project-using-plugins-and-gradlew

1 file changed

+16
-2
lines changed

examples/disconnected-project-using-plugins-and-gradlew/build.gradle

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
buildscript {
2+
repositories {
3+
// To use gradle in disconnected mode, you just need to set the 'disconnected' property. E.g. gradle compileJava -Pdisconnected
4+
if (project.hasProperty("disconnected") && !"FALSE".equalsIgnoreCase(disconnected)) {
5+
println "Using offline buildscript dependency repositories"
6+
maven { url uri(projectMavenRepo) }
7+
} else {
8+
println "Using online buildscript dependency repositories"
9+
jcenter()
10+
maven { url "http://developer.marklogic.com/maven2/" }
11+
}
12+
}
13+
}
14+
115
plugins {
216
id 'java' //optional - delete if not needed
317
id 'net.saliman.properties' version '1.4.6'
@@ -7,10 +21,10 @@ plugins {
721
repositories {
822
// To use gradle in disconnected mode, you just need to set the 'disconnected' property. E.g. gradle compileJava -Pdisconnected
923
if (project.hasProperty("disconnected") && !"FALSE".equalsIgnoreCase(disconnected)) {
10-
println "Using offline repositories"
24+
println "Using offline dependency repositories"
1125
maven { url uri(projectMavenRepo) }
1226
} else {
13-
println "Using online repositories"
27+
println "Using online dependency repositories"
1428
jcenter()
1529
maven { url "http://developer.marklogic.com/maven2/" }
1630
}

0 commit comments

Comments
 (0)