This is an automated email from the ASF dual-hosted git repository.
Harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new b05685a709 Add Node.js executable configuration to build process and
codegraph scripts
b05685a709 is described below
commit b05685a709f2d51456cf2e0c70e36fb6185e99c6
Author: Harbs <[email protected]>
AuthorDate: Tue Aug 4 00:58:45 2026 +0300
Add Node.js executable configuration to build process and codegraph scripts
---
distribution/pom.xml | 35 ++++++++++++++++++++++++++++++++++-
frameworks/codegraphs.xml | 9 +++++----
2 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 9fa04f6543..b837c2cd04 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -46,6 +46,8 @@
<assembly.dir>dir-without-swf.xml</assembly.dir>
<assembly.sdk-description>royale-sdk-description.xml</assembly.sdk-description>
<codegraphs.directory>${project.build.directory}/codegraphs</codegraphs.directory>
+
<node.install.directory>${project.build.directory}/node-runtime</node.install.directory>
+ <node.executable>${node.install.directory}/node/node</node.executable>
</properties>
<modules>
@@ -72,6 +74,24 @@
</plugins>
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>com.github.eirslett</groupId>
+ <artifactId>frontend-maven-plugin</artifactId>
+ <version>1.15.4</version>
+ <executions>
+ <execution>
+ <id>install-node</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>install-node-and-npm</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <installDirectory>${node.install.directory}</installDirectory>
+ <nodeVersion>v22.23.2</nodeVersion>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -224,6 +244,7 @@
target="codegraph-index"
inheritAll="false">
<property name="codegraph.targets"
value="${royale.codegraph.targets}"/>
+ <property name="node.executable" value="${node.executable}"/>
</ant>
<delete dir="${project.build.directory}/codegraphs"/>
<copy todir="${project.build.directory}/codegraphs">
@@ -243,7 +264,7 @@
<delete
dir="${project.build.directory}/codegraphs-verification"/>
<unzip
src="${project.build.directory}/${distributionFileName}-codegraphs.zip"
dest="${project.build.directory}/codegraphs-verification"/>
- <exec executable="node" failonerror="true">
+ <exec executable="${node.executable}" failonerror="true">
<arg
value="${project.basedir}/../frameworks/scripts/verify-codegraph-package.js"/>
<arg value="--root"/>
<arg
value="${project.build.directory}/codegraphs-verification"/>
@@ -733,6 +754,18 @@
</dependencies>
<profiles>
+ <profile>
+ <id>node-executable-windows</id>
+ <activation>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+ <properties>
+
<node.executable>${node.install.directory}/node/node.exe</node.executable>
+ </properties>
+ </profile>
+
<profile>
<id>apache-release</id>
<build>
diff --git a/frameworks/codegraphs.xml b/frameworks/codegraphs.xml
index 6013de3959..25aae0f556 100644
--- a/frameworks/codegraphs.xml
+++ b/frameworks/codegraphs.xml
@@ -26,6 +26,7 @@
<property environment="env"/>
<property file="${ROYALE_HOME}/local.properties"/>
<property file="${ROYALE_HOME}/build.properties"/>
+ <property name="node.executable" value="node"/>
<condition property="ROYALE_COMPILER_HOME" value="${ROYALE_HOME}/js">
<available file="${ROYALE_HOME}/js/lib/codegraph.jar"/>
@@ -106,7 +107,7 @@
</target>
<target name="codegraph-index"
depends="validate-codegraphs,generate-index-metadata">
- <exec executable="node" failonerror="true">
+ <exec executable="${node.executable}" failonerror="true">
<arg value="${basedir}/scripts/generate-codegraph-index.js"/>
<arg value="--metadata"/>
<arg value="${basedir}/target/codegraph-index-metadata.tsv"/>
@@ -131,7 +132,7 @@
</target>
<target name="validate-codegraphs">
- <exec executable="node" failonerror="true">
+ <exec executable="${node.executable}" failonerror="true">
<arg value="${basedir}/scripts/validate-codegraphs.js"/>
<arg value="--root"/>
<arg value="${basedir}/projects"/>
@@ -141,7 +142,7 @@
</target>
<target name="validate-codegraph" depends="codegraph">
- <exec executable="node" failonerror="true">
+ <exec executable="${node.executable}" failonerror="true">
<arg value="${basedir}/scripts/validate-codegraphs.js"/>
<arg value="--root"/>
<arg value="${basedir}/projects"/>
@@ -158,7 +159,7 @@
<fileset dir="${basedir}/projects/${codegraph.module}"
includes="target/codegraph/**/*.json"/>
</copy>
<antcall target="codegraph"/>
- <exec executable="node" failonerror="true">
+ <exec executable="${node.executable}" failonerror="true">
<arg value="${basedir}/scripts/validate-codegraphs.js"/>
<arg value="--root"/>
<arg value="${basedir}/projects"/>