-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
8347362: RichTextArea Demo Apps Build Script
Reviewed-by: kcr
- Loading branch information
Andy Goryachev
committed
Jan 13, 2025
1 parent
b7b4d6e
commit dcfe56b
Showing
2 changed files
with
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
This build requires javafx.home property, pointing to JavaFX SDK (23+) directory, e.g.: | ||
ant -Djavafx.home=<DIR> | ||
unless built as a part of openjfx repository where the default value is sufficient. | ||
--> | ||
<project default="build-all" basedir="."> | ||
|
||
<!-- project config --> | ||
<property name="TARGET" value="RichEditorDemo" /> | ||
<property name="MAIN_CLASS" value="com.oracle.demo.richtext.editor.RichEditorDemoApp"/> | ||
<property name="javafx.home" value="../../../build/sdk" /> | ||
|
||
<target name="clean"> | ||
<delete includeEmptyDirs="true" dir="build" failonerror="false" /> | ||
<delete includeEmptyDirs="true" dir="dist" failonerror="false" /> | ||
</target> | ||
|
||
|
||
<target name="init" depends="clean"> | ||
<mkdir dir="build" /> | ||
<mkdir dir="build/classes" /> | ||
<mkdir dir="build/jars" /> | ||
<mkdir dir="dist" /> | ||
</target> | ||
|
||
|
||
<target name="compile" depends="init"> | ||
<javac | ||
srcdir="src" | ||
destdir="build/classes" | ||
debug="true" | ||
encoding="utf-8" | ||
fork="true" | ||
nowarn="true" | ||
optimize="false" | ||
source="23" | ||
target="23" | ||
includeantruntime="false" | ||
> | ||
<compilerarg value="-Xlint:none"/> | ||
<compilerarg line="--module-path ${javafx.home}/lib --add-modules javafx.base,javafx.graphics,javafx.controls,jfx.incubator.input,jfx.incubator.richtext"/> | ||
</javac> | ||
</target> | ||
|
||
|
||
<!-- copies non-java resources --> | ||
<target name="copy-resources" depends="init"> | ||
<copy todir="build/classes"> | ||
<fileset dir="src" excludes="**/*.java" /> | ||
</copy> | ||
</target> | ||
|
||
|
||
<!-- builds the app jar --> | ||
<target name="make-jar" depends="compile, copy-resources"> | ||
<delete file="build/jars/${TARGET}.jar" /> | ||
|
||
<jar jarfile="build/jars/${TARGET}.jar" basedir="build/classes" filesonly="true"> | ||
<manifest> | ||
<attribute name="Main-Class" value="${MAIN_CLASS}" /> | ||
<attribute name="Created-By" value="andy@goryachev.com" /> | ||
</manifest> | ||
</jar> | ||
</target> | ||
|
||
|
||
<!-- copies jar to base dir --> | ||
<target name="copy-jar" depends="make-jar"> | ||
<copy file="build/jars/${TARGET}.jar" todir="dist/" /> | ||
</target> | ||
|
||
|
||
<!-- builds all --> | ||
<target name="build-all" depends="compile, copy-resources, make-jar, copy-jar" /> | ||
|
||
|
||
<target name="run-codearea-demo"> | ||
<exec executable="java"> | ||
<arg line="--module-path '${javafx.home}/lib' --add-modules 'javafx.base,javafx.graphics,javafx.controls,jfx.incubator.input,jfx.incubator.richtext' -classpath 'dist/${TARGET}.jar' com.oracle.demo.richtext.codearea.CodeAreaDemoApp" /> | ||
</exec> | ||
</target> | ||
|
||
|
||
<target name="run-notebook-demo"> | ||
<exec executable="java"> | ||
<arg line="--module-path '${javafx.home}/lib' --add-modules 'javafx.base,javafx.graphics,javafx.controls,jfx.incubator.input,jfx.incubator.richtext' -classpath 'dist/${TARGET}.jar' com.oracle.demo.richtext.notebook.NotebookMockupApp" /> | ||
</exec> | ||
</target> | ||
|
||
|
||
<target name="run-richeditor-demo"> | ||
<exec executable="java"> | ||
<arg line="--module-path ${javafx.home}/lib --add-modules javafx.base,javafx.graphics,javafx.controls,jfx.incubator.input,jfx.incubator.richtext -classpath dist/${TARGET}.jar com.oracle.demo.richtext.editor.RichEditorDemoApp" /> | ||
</exec> | ||
</target> | ||
|
||
|
||
<target name="run-richtextarea-demo"> | ||
<exec executable="java"> | ||
<arg line="--module-path ${javafx.home}/lib --add-modules javafx.base,javafx.graphics,javafx.controls,jfx.incubator.input,jfx.incubator.richtext -classpath dist/${TARGET}.jar com.oracle.demo.richtext.rta.RichTextAreaDemoApp" /> | ||
</exec> | ||
</target> | ||
|
||
|
||
<!-- alias to build-all target, to make it compatible with the rest of the apps --> | ||
<target name="jar" depends="build-all" /> | ||
</project> |
dcfe56b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review
Issues