-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Gradle JDK automanagment] GradleWrapperMain patching #341
Changes from 70 commits
bbc0406
e9a049f
f39dae0
681d482
36d77f2
072e15b
4f75484
d49fa30
48dd039
9de3b3a
8a7c230
c1eface
3063421
5e97259
b2575df
e940d88
26c1dd0
5d4035b
b035967
28942d1
72523ef
ab4d87e
f45b357
68ebd35
f37727f
e04d97e
a756908
422a69c
9df726b
7ace1a5
3ed5098
b32f333
227d4d7
2ad913f
b7aca82
458d53e
5483cc3
607293b
f19cb2d
7933d69
e580952
d5fbb1f
3a49ce4
3b838d3
6ee7cb8
a8a2b76
68f0889
027406f
1d0e1b4
7ddb086
a0ef1cc
488122e
30d290d
b1512b6
8e0ed7b
480b7af
ba9ff4b
1920ab3
b520f8e
2b249aa
93f81af
c354fbc
d2a25b4
aaf2126
27aa008
0d939b7
1b0f867
8717b3d
838a200
7e2cab0
d08cb21
e98404b
c8b37a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: improvement | ||
improvement: | ||
description: '[Gradle JDK automanagment] GradleWrapperMain patching' | ||
links: | ||
- https://github.com/palantir/gradle-jdks/pull/341 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apply plugin: 'java' | ||
apply plugin: 'com.palantir.external-publish-jar' | ||
|
||
dependencies { | ||
// Avoid adding large compile dependencies here, as they will also be added in the gradle-jdks-setup-all*.jar using the fatJar task | ||
implementation 'com.fasterxml.jackson.core:jackson-annotations' | ||
|
||
testImplementation platform('org.junit:junit-bom:5.9.1') | ||
testImplementation 'org.junit.jupiter:junit-jupiter' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ testSets { | |
} | ||
|
||
dependencies { | ||
// Avoid adding compile dependencies here, as they will also need to be added in the gradle-jdks-setup*.jar | ||
// Avoid adding large compile dependencies here, as they will also be added in the gradle-jdks-setup-all*.jar using the fatJar task | ||
implementation project(':gradle-jdks-setup-common') | ||
|
||
testImplementation 'org.junit.jupiter:junit-jupiter' | ||
testImplementation 'org.assertj:assertj-core' | ||
|
@@ -21,10 +22,23 @@ dependencies { | |
integrationTestImplementation 'org.assertj:assertj-core' | ||
} | ||
|
||
task fatJar(type: Jar) { | ||
dependsOn tasks.jar, ':gradle-jdks-setup-common:jar' | ||
manifest { | ||
attributes 'Main-Class': 'com.palantir.gradle.jdks.setup.GradleJdkInstallationSetup' | ||
} | ||
archiveBaseName = 'gradle-jdks-setup-all' | ||
duplicatesStrategy = DuplicatesStrategy.FAIL | ||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } | ||
with jar | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.errorprone.disable 'PreferSafeLoggableExceptions' | ||
} | ||
|
||
tasks.integrationTest { | ||
environment("PROJECT_VERSION", project.version) | ||
} | ||
|
||
tasks.build.dependsOn tasks.fatJar | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How are we going to ship the fat jar to people? I guess we don't have the code in the plugin to do this yet (?), but I imagine we're either going to include the fat jar as a resource or download it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, we don't have yet the code in the plugin to do this yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well use
tasks.register('fatJar', Jar) {
for Gradle best practices.