Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
build

.idea
.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@
## [0.9.9]

- Fix bug introduced in 0.9.8 preventing startup. Docker laying improvements not yet working, so
currently equivalent to 0.9.4
currently equivalent to 0.9.4
5 changes: 3 additions & 2 deletions hypertrace-gradle-docker-java-application-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ default behavior of `com.bmuschko.docker-java-application` for identifying main
An application can define multiple variants which allow specifying different base images to use.

- `javaVersion`
- JavaVersion
- JavaVersion
- Defaults to the toolchain version from the java plugin
- `baseImage`
- String
- Defaults to hypertrace/java:JavaMajorVersion
Expand Down Expand Up @@ -121,4 +122,4 @@ Produces a diff of:
+HEALTHCHECK -interval=2s --start-period=15s --timeout=2s CMD wget -qO- http://127.0.0.1:9003/health &> /dev/null || exit 1
-ENV SERVICE_NAME=example-app
+ENV SERVICE_NAME=example-app MY_VAR=foo
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
}

java {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}

gradlePlugin {
Expand All @@ -21,4 +21,3 @@ dependencies {
api("com.bmuschko:gradle-docker-plugin:7.4.0")
api(project(":hypertrace-gradle-docker-plugin"))
}

Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ public void apply(Project target) {
}

private void addApplicationExtension(Project project) {
this.getHypertraceDockerExtension(project)
.getExtensions()
.create(EXTENSION_NAME, HypertraceDockerJavaApplication.class, project.getName());
HypertraceDockerJavaApplication extension =
this.getHypertraceDockerExtension(project)
.getExtensions()
.create(EXTENSION_NAME, HypertraceDockerJavaApplication.class, project.getName());

extension.javaVersion.convention(
getJavaExtension(project).getToolchain().getLanguageVersion().map(JavaVersion::toVersion)
.orElse(JavaVersion.VERSION_11));
}

private void updateDefaultJvmArgs(Project project, HypertraceDockerJavaApplication javaApplication) {
Expand Down Expand Up @@ -233,11 +238,14 @@ private Configuration getRuntimeClasspath(Project project) {
}

private SourceSetOutput mainSourceSetOutput(Project project) {
return project.getExtensions()
.getByType(JavaPluginExtension.class)
.getSourceSets()
.getByName(SourceSet.MAIN_SOURCE_SET_NAME)
.getOutput();
return getJavaExtension(project)
.getSourceSets()
.getByName(SourceSet.MAIN_SOURCE_SET_NAME)
.getOutput();
}

private JavaPluginExtension getJavaExtension(Project project) {
return project.getExtensions().getByType(JavaPluginExtension.class);
}

private Provider<File> provideIfDirectoryExists(Provider<Directory> directoryProvider) {
Expand Down
4 changes: 2 additions & 2 deletions hypertrace-gradle-docker-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
}

java {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_11
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not strictly related but this plugin has some java 11 references in it so although generating jre8 classes it would have failed at runtime. We don't need the 8 support so fixed the compatibility rather than the code

sourceCompatibility = JavaVersion.VERSION_11
}

gradlePlugin {
Expand Down
4 changes: 2 additions & 2 deletions hypertrace-gradle-docker-publish-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
}

java {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}

gradlePlugin {
Expand Down
Loading