Skip to content

Commit

Permalink
Added Gradle dependency lock support.
Browse files Browse the repository at this point in the history
Applied changes requested by review (@JLLeitschuh).
  • Loading branch information
fvgh committed Jun 3, 2018
1 parent 8cbbaab commit b9eab72
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

#Gradle-Lock files in _ext just serving as an input for lib-extra
_ext/*/gradle/dependency-locks/compileClasspath.lockfile

### Eclipse ###
*.pydevproject
.metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private static BundleFile getBundlFile(Class<?> clazz) throws BundleException {
try {
return jarOrDirectory.isDirectory() ? new DirBundleFile(jarOrDirectory, false) : new ZipBundleFile(jarOrDirectory, null, null, null);
} catch (IOException e) {
throw new BundleException(String.format("Cannot access bundle at '%s'.", jarOrDirectory), BundleException.READ_ERROR);
throw new BundleException(String.format("Cannot access bundle at '%s'.", jarOrDirectory), BundleException.READ_ERROR, e);
}
}

Expand Down
12 changes: 12 additions & 0 deletions _ext/gradle/java-setup.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ sourceCompatibility = ext_VER_JAVA
targetCompatibility = ext_VER_JAVA
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }

// Use file locking
configurations {
compileClasspath {
def gradleVersion = GradleVersion.current()
def requiredVersion = GradleVersion.version('4.8')
if (gradleVersion >= requiredVersion) {
resolutionStrategy.activateDependencyLocking()
}
}
}


/////////////
// ECLIPSE //
/////////////
Expand Down

1 comment on commit b9eab72

@JLLeitschuh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember requesting these changes did I?

Please sign in to comment.