forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#25986 from zakkak/maodule-path-patch
Introduce new JPMS exports to allow running native-image on module-path
- Loading branch information
Showing
6 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...main/java/io/quarkus/deployment/pkg/steps/NativeOrNativeSourcesBuildGraal22_2OrLater.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.quarkus.deployment.pkg.steps; | ||
|
||
import java.util.function.BooleanSupplier; | ||
|
||
import org.graalvm.home.Version; | ||
|
||
import io.quarkus.deployment.pkg.PackageConfig; | ||
|
||
/** | ||
* Supplier that can be used to only run build steps in the | ||
* native or native sources builds when using Graal >= 22.2. | ||
* Most build steps that need to be run conditionally should use this instead of {@link NativeBuild}. | ||
*/ | ||
public class NativeOrNativeSourcesBuildGraal22_2OrLater implements BooleanSupplier { | ||
|
||
private final PackageConfig packageConfig; | ||
|
||
NativeOrNativeSourcesBuildGraal22_2OrLater(PackageConfig packageConfig) { | ||
this.packageConfig = packageConfig; | ||
} | ||
|
||
@Override | ||
public boolean getAsBoolean() { | ||
return (packageConfig.type.equalsIgnoreCase(PackageConfig.NATIVE) | ||
|| packageConfig.type.equalsIgnoreCase(PackageConfig.NATIVE_SOURCES)) | ||
&& (Version.getCurrent().isSnapshot() || Version.getCurrent().compareTo(22, 2) >= 0); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters