Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sources to uberjar source jar. #468

Merged
merged 1 commit into from Apr 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions openjdk-uber/build.gradle
Expand Up @@ -6,6 +6,7 @@ ext {
'osx-x86_64,linux-x86_64,windows-x86,windows-x86_64')).split(',')
classesDir = "${buildDir}/classes"
resourcesDir = "${buildDir}/resources"
sourcesDir = "${buildDir}/sources"
}

if (buildUberJar) {
Expand All @@ -19,6 +20,10 @@ if (buildUberJar) {
from resourcesDir
}

sourcesJar {
from sourcesDir
}

// Add the dependencies for the uber jar.
uberJarClassifiers.each { uberJarClassifier ->
dependencies.uberJar "${group}:conscrypt-openjdk:${version}:${uberJarClassifier}"
Expand Down Expand Up @@ -52,6 +57,14 @@ if (buildUberJar) {
}
jar.dependsOn copyClasses

task copySources(type: Copy, dependsOn: ":conscrypt-openjdk:sourcesJar") {
from {
project(":conscrypt-openjdk").sourceSets.main.java
}
into file(sourcesDir)
}
sourcesJar.dependsOn copySources

// Append the BoringSSL-Version to the manifest. Note that this assumes that the
// version of BoringSSL for each artifact exactly matches the one on the
// current system.
Expand Down