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

Build GeoScript with JDK 17 #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Build GeoScript with JDK 17
hungd11 committed Apr 19, 2024
commit e07c970785f74998d5fa1e3b4cf5e14b3ecc8961
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload geoscript-groovy.zip
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -375,6 +375,10 @@
<source>1.8</source>
<target>1.8</target>
<compilerId>groovy-eclipse-compiler</compilerId>
<compilerArgs>
<arg>--add-exports</arg>
<arg>java.desktop/sun.awt.image=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
<dependencies>
<dependency>
@@ -396,6 +400,7 @@
<configuration>
<forkMode>once</forkMode>
<argLine>@{argLine} -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=1024m</argLine>
<argLine>@{argLine} --add-exports java.desktop/sun.awt.image=ALL-UNNAMED</argLine>
<systemPropertyVariables>
<org.geotools.referencing.forceXY>true</org.geotools.referencing.forceXY>
</systemPropertyVariables>
2 changes: 1 addition & 1 deletion src/main/groovy/geoscript/filter/Color.groovy
Original file line number Diff line number Diff line change
@@ -345,7 +345,7 @@ class Color extends Expression {
int r = color[0].toInteger()
int g = color[1].toInteger()
int b = color[2].toInteger()
int a = color.size > 3 ? color[3].toInteger() : 0
int a = color.size() > 3 ? color[3].toInteger() : 0
return new java.awt.Color(r, g, b, a)
}
// RGB as Map [r:255,g:255,b:0,a:125]