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

Use Ant for building NetBeans Gradle Tooling #6816

Merged
merged 1 commit into from Dec 9, 2023

Conversation

lkishalmi
Copy link
Contributor

Well, I do not necessarily like this one, however it helps building NetBeans without real Gradle Runtime dependencies.

@mbien
Copy link
Member

mbien commented Dec 8, 2023

thanks a lot for doing this Laszlo!

could you remove those two bits too in the same commit?

netbeans/README.md

Lines 75 to 76 in 0ce04e9

* Building the gradle modules on recent JDKs might fail with "Unsupported class file major version" errors. In that case the gradle daemon must be
configured to run on a compatible JDK (for example add `org.gradle.java.home=/home/duke/jdk17` to your `~/.gradle/gradle.properties`, see [gradle doc](https://docs.gradle.org/current/userguide/build_environment.html)).

and

- name: Setup Gradle Daemon to run on JDK 11
if: ${{ matrix.java == '21' }}
run: |
mkdir -p ~/.gradle
#uses a preinstalled JDK 11 from the runner
echo "org.gradle.java.home=$JAVA_HOME_11_X64" >> ~/.gradle/gradle.properties

@mbien mbien linked an issue Dec 8, 2023 that may be closed by this pull request
@matthiasblaesing
Copy link
Contributor

Thanks for fixing this. It currently fails to build from source because the ant call from the build script of the gradle module causes a wrong base directory to be used. This fixes that:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/extide/gradle/build.xml
+++ b/extide/gradle/build.xml
@@ -58,7 +58,7 @@
     </target>
 
     <target name="build-tooling-lib" depends="-download.release.files,-copy-gradle-wrapper,-uptodate-tooling" unless="tooling.uptodate">
-        <ant antfile="${tooling}/build.xml" inheritAll="false" target="build" />
+        <ant antfile="build.xml" dir="${tooling}" inheritAll="false" target="build" />
         <copy file="${tooling}/build/libs/${tooling}.jar" todir="build/tooling" overwrite="true"/>
         <copy file="${tooling}/src/main/resources/nb-tooling.gradle" todir="build/tooling" overwrite="true"/>
     </target>

With that change netbeans builds again.

@lkishalmi lkishalmi force-pushed the build-gradle-tooling-with-ant branch from 38d9335 to fc3d67e Compare December 9, 2023 07:22
@lkishalmi lkishalmi merged commit b6a064d into apache:master Dec 9, 2023
34 checks passed
@mbien mbien added Gradle [ci] enable "build tools" tests Ant [ci] enable "build tools" tests labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ant [ci] enable "build tools" tests build Gradle [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow building with latest JDK without extra setup
3 participants