(netbeans) branch master updated: Gradle Project shall use the Java from the tooling not runtime.

2024-03-24 Thread lkishalmi
This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
 new d13f34ba74 Gradle Project shall use the Java from the tooling not 
runtime.
d13f34ba74 is described below

commit d13f34ba7422948db84075f7772e15be4274e02b
Author: Laszlo Kishalmi 
AuthorDate: Sun Feb 4 07:23:37 2024 -0800

Gradle Project shall use the Java from the tooling not runtime.
---
 .../gradle/tooling/NbProjectInfoBuilder.java   |  23 ++
 .../modules/gradle/cache/ProjectInfoDiskCache.java |   2 +-
 java/gradle.java/apichanges.xml|  22 ++
 java/gradle.java/manifest.mf   |   1 +
 java/gradle.java/nbproject/project.properties  |   3 +-
 java/gradle.java/nbproject/project.xml |   1 +
 .../gradle/java/api/GradleJavaProjectBuilder.java  |   9 +-
 .../gradle/java/api/GradleJavaSourceSet.java   |  17 ++
 .../classpath/AbstractGradleClassPathImpl.java |   7 +-
 .../gradle/java/classpath/BootClassPathImpl.java   |  43 ++--
 .../java/classpath/ClassPathProviderImpl.java  |   4 +-
 .../classpath/GlobalClassPathProviderImpl.java |  44 ++--
 .../gradle/java/customizer/Bundle.properties   |   1 +
 .../gradle/java/customizer/SourceSetPanel.form |  45 +++-
 .../gradle/java/customizer/SourceSetPanel.java |  49 +++-
 .../gradle/java/nodes/BootCPNodeFactory.java   | 280 +
 .../java/spi/support/JavaToolchainSupport.java | 122 +
 17 files changed, 371 insertions(+), 302 deletions(-)

diff --git 
a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
 
b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
index 0362bf0e2f..332c5360d0 100644
--- 
a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
+++ 
b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java
@@ -105,9 +105,13 @@ import org.gradle.api.tasks.bundling.Jar;
 import org.gradle.api.tasks.testing.Test;
 import org.gradle.internal.resolve.ArtifactResolveException;
 import org.gradle.jvm.JvmLibrary;
+import org.gradle.jvm.toolchain.JavaCompiler;
 import org.gradle.language.base.artifact.SourcesArtifact;
 import org.gradle.language.java.artifact.JavadocArtifact;
 import org.gradle.plugin.use.PluginId;
+import org.gradle.api.provider.Property;
+import org.gradle.jvm.toolchain.JavaInstallationMetadata;
+import org.gradle.jvm.toolchain.JavaLauncher;
 import org.gradle.util.GradleVersion;
 import org.netbeans.modules.gradle.tooling.internal.NbProjectInfo;
 import org.netbeans.modules.gradle.tooling.internal.NbProjectInfo.Report;
@@ -1205,6 +1209,13 @@ class NbProjectInfoBuilder {
 o.toString()
 );
 }
+
+sinceGradle("6.7", () -> {
+
fetchJavaInstallationMetadata(compileTask).ifPresent(
+(meta) -> model.getInfo().put(propBase 
+ lang + "_compiler_java_home", meta.getInstallationPath().getAsFile())
+);
+});
+
 List compilerArgs;
 
 compilerArgs = (List) 
getProperty(compileTask, "options", "allCompilerArgs");
@@ -1311,6 +1322,18 @@ class NbProjectInfoBuilder {
 }
 }
 
+private Optional 
fetchJavaInstallationMetadata(Task task) {
+Property launcherProperty = (Property) 
getProperty(task, "javaLauncher");
+if (launcherProperty != null && launcherProperty.isPresent()) {
+return Optional.of(launcherProperty.get().getMetadata());
+}
+Property compilerProperty = (Property) 
getProperty(task, "javaCompiler");
+if (compilerProperty != null && compilerProperty.isPresent()) {
+return Optional.of(compilerProperty.get().getMetadata());
+}
+return Optional.empty();
+}
+
 private void detectArtifacts(NbProjectInfoModel model) {
 if (project.getPlugins().hasPlugin("java")) {
 model.getInfo().put("main_jar", getProperty(project, "jar", 
"archivePath"));
diff --git 
a/extide/gradle/src/org/netbeans/modules/gradle/cache/ProjectInfoDiskCache.java 
b/extide/gradle/src/org/netbeans/modules/gradle/cache/ProjectInfoDiskCache.java
index 5718378b2d..a195c37523 100644
--- 
a/extide/gradle/src/org/netbeans/modules/gradle/cache/ProjectInfoDiskCache.java
+++ 
b/extide/gradle/src/org/netbeans/modules/gradle/cache/ProjectInfoDiskCache.java
@@ -45,7 +45,7 @@ import 

(netbeans) branch master updated (0ddeb9fb9a -> f24a0ca6e3)

2024-03-24 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


from 0ddeb9fb9a Merge pull request #7181 from mbien/ci-delete-action-update
 add cecb233218 Remove experimental maven download feature.
 add f24a0ca6e3 Merge pull request #7182 from 
mbien/remove-maven-download-feature

No new revisions were added by this update.

Summary of changes:
 java/maven/nbproject/project.properties|   2 +-
 .../maven/execute/MavenCommandLineExecutor.java| 265 +++--
 .../modules/maven/options/Bundle.properties|   6 -
 .../modules/maven/options/MavenSettings.java   |  46 +++-
 .../modules/maven/options/SettingsPanel.form   | 142 +--
 .../modules/maven/options/SettingsPanel.java   | 135 +--
 6 files changed, 68 insertions(+), 528 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



(netbeans) branch master updated (a74ce3b45c -> 0ddeb9fb9a)

2024-03-24 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


from a74ce3b45c Java 17 Support with Sigtest 2.2 from JakartaEE TCK Tools
 add 34e47694cb Update delete-artifact action and JDK 22 version to ga.
 new 0ddeb9fb9a Merge pull request #7181 from mbien/ci-delete-action-update

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/actions/delete-artifact |  1 -
 .github/workflows/main.yml  | 49 +
 .gitmodules |  3 ---
 3 files changed, 20 insertions(+), 33 deletions(-)
 delete mode 16 .github/actions/delete-artifact
 delete mode 100644 .gitmodules


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



(netbeans) 01/01: Merge pull request #7181 from mbien/ci-delete-action-update

2024-03-24 Thread mbien
This is an automated email from the ASF dual-hosted git repository.

mbien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git

commit 0ddeb9fb9ac6f762951f2a006c985a97e944b16c
Merge: a74ce3b45c 34e47694cb
Author: Michael Bien 
AuthorDate: Sun Mar 24 18:42:41 2024 +0100

Merge pull request #7181 from mbien/ci-delete-action-update

Update delete-artifact action and JDK 22 version to ga.

 .github/actions/delete-artifact |  1 -
 .github/workflows/main.yml  | 49 +
 .gitmodules |  3 ---
 3 files changed, 20 insertions(+), 33 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists