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

Bump kotlinx-serialization-json from 1.5.0 to 1.5.1 #211

Closed
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
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<azure-functions-java-spi.version>1.0.0</azure-functions-java-spi.version>
<kotlin.version>1.8.21</kotlin.version>
<kotlin.coroutine.version>1.6.4</kotlin.coroutine.version>
<kotlin-serialization.version>1.5.0</kotlin-serialization.version>
<kotlin-serialization.version>1.5.1</kotlin-serialization.version>
<dekorate.version>3.6.0</dekorate.version> <!-- Please check with Java Operator SDK team before updating -->
<maven-invoker.version>3.2.0</maven-invoker.version>
<awaitility.version>4.2.0</awaitility.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package io.quarkus.deployment.pkg.steps;

import java.nio.file.Path;
import java.util.List;

public class NativeImageBuildRunnerDummy extends NativeImageBuildRunner {

private static final String MESSAGE = "NativeImageBuildRunnerDummy is note meant to be used to perform an actual build.";
private final boolean isContainer;

public NativeImageBuildRunnerDummy(boolean isContainer) {
this.isContainer = isContainer;
}

@Override
public boolean isContainer() {
return isContainer;
}

@Override
protected String[] getGraalVMVersionCommand(List<String> args) {
throw new RuntimeException(MESSAGE);
}

@Override
protected String[] getBuildCommand(Path outputDir, List<String> args) {
throw new RuntimeException(MESSAGE);
}

@Override
protected void objcopy(Path outputDir, String... args) {
throw new RuntimeException(MESSAGE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ private String getResultingExecutableName(String nativeImageName, boolean isCont
/**
* Resolves the runner factory. Happens quite early, *before* the build.
*/
@BuildStep
@BuildStep(onlyIf = NativeBuild.class)
public NativeImageRunnerBuildItem resolveNativeImageBuildRunner(NativeConfig nativeConfig) {
boolean isExplicitContainerBuild = nativeConfig.containerBuild()
.orElse(nativeConfig.containerRuntime().isPresent() || nativeConfig.remoteContainerBuild());
Expand All @@ -353,6 +353,16 @@ public NativeImageRunnerBuildItem resolveNativeImageBuildRunner(NativeConfig nat
return new NativeImageRunnerBuildItem(new NativeImageBuildLocalContainerRunner(nativeConfig));
}

/**
* Creates a dummy runner for native-sources builds. This allows the creation of native-source jars without
* requiring podman/docker or a local native-image installation.
*/
@BuildStep(onlyIf = NativeSourcesBuild.class)
public NativeImageRunnerBuildItem dummyNativeImageBuildRunner(NativeConfig nativeConfig) {
boolean explicitContainerBuild = nativeConfig.isExplicitContainerBuild();
return new NativeImageRunnerBuildItem(new NativeImageBuildRunnerDummy(explicitContainerBuild));
}

private void copyJarSourcesToLib(OutputTargetBuildItem outputTargetBuildItem,
CurateOutcomeBuildItem curateOutcomeBuildItem) {
Path targetDirectory = outputTargetBuildItem.getOutputDirectory()
Expand Down
5 changes: 3 additions & 2 deletions docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,11 @@ $ ./mvnw clean package -Dquarkus.package.type=native-sources -Dquarkus.native.co
cd target/native-sources
docker run \
-it \
--user $(id -ur):$(id -gr) \
--rm \
--v $(pwd):/work \# <1>
-v $(pwd):/work \# <1>
-w /work \# <2>
--entrypoint bin/sh \
--entrypoint /bin/sh \
$(cat native-builder.image) \# <3>
-c "native-image $(cat native-image.args) -J-Xmx4g"# <4>
----
Expand Down