Skip to content

Commit 4921b05

Browse files
committed
Modified the build.gradle files to support building on JDK 7
even with a clean local repo. Jcenter HTTPS no longer works from JDK 7 so we have to fall back to the HTTP interface.
1 parent 558fe43 commit 4921b05

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ compileJava {
4242

4343
repositories {
4444
mavenLocal()
45-
jcenter()
45+
46+
if( JavaVersion.current() == JavaVersion.VERSION_1_7 ) {
47+
// Fallback for JDK 7 that can no longer connect to jcenter with https
48+
maven { url "http://jcenter.bintray.com" }
49+
} else {
50+
jcenter()
51+
}
4652
}
4753

4854
// Make sure the build file declares what it actually imports

0 commit comments

Comments
 (0)