Skip to content

All required --add-opens for StyleApi.groovy added to build.gradle #8

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.gradle/
*~
#*
build/


*.so
76 changes: 52 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'application'

version='1.0.1-SNAPSHOT'
group='com.simsilica'

mainClassName = 'com.simsilica.arboreal.TreeEditor'

applicationDefaultJvmArgs = ["-Xmx512m", "-XX:MaxDirectMemorySize=512m"]
application {
applicationDefaultJvmArgs = [ "-ea", "-Xmx3g", "-Xms512m",
"-XX:MaxDirectMemorySize=3g",
"--add-opens", "java.base/java.io=ALL-UNNAMED",
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.math=ALL-UNNAMED",
"--add-opens", "java.base/java.util=ALL-UNNAMED" ]
}

repositories {
mavenLocal()
jcenter()

// Temporary until JME jars are in jcenter()
maven { url "http://dl.bintray.com/jmonkeyengine/org.jmonkeyengine" }
//maven { url "http://dl.bintray.com/jmonkeyengine/org.jmonkeyengine" }

// Meta-jb stuff
maven { url "http://svn.code.sf.net/p/meta-jb/svn/trunk/dev/m2-repo/" }
maven { url "https://svn.code.sf.net/p/meta-jb/svn/trunk/dev/m2-repo/" }
}

// Make sure the build file declares what it actually imports
configurations.compile {
configurations.implementation {
transitive = false
}

Expand All @@ -34,45 +41,47 @@ sourceSets.main.resources {
// In this section you declare the dependencies for your production and test code
dependencies {

compile "org.jmonkeyengine:jme3-core:3.1.+"
compile "org.jmonkeyengine:jme3-desktop:3.1.+"
compile "org.jmonkeyengine:jme3-effects:3.1.+"
compile "org.jmonkeyengine:jme3-lwjgl:3.1.+"
implementation "org.jmonkeyengine:jme3-core:3.1.+"
implementation "org.jmonkeyengine:jme3-desktop:3.1.+"
implementation "org.jmonkeyengine:jme3-effects:3.1.+"
implementation "org.jmonkeyengine:jme3-lwjgl:3.1.+"

compile "com.simsilica:sim-arboreal:1.0.1-SNAPSHOT"
runtime 'com.simsilica:sim-arboreal:1.0.1-SNAPSHOT:assets'
implementation "com.simsilica:sim-arboreal:1.0.1-SNAPSHOT"
runtimeOnly 'com.simsilica:sim-arboreal:1.0.1-SNAPSHOT:assets'

compile "com.simsilica:lemur:1.6.+"
compile "com.simsilica:lemur-proto:1.5.+"
compile "com.simsilica:lemur-props:1.0.+"
runtime 'org.codehaus.groovy:groovy-all:2.4.5'
implementation "com.simsilica:lemur:1.6.+"
implementation "com.simsilica:lemur-proto:1.5.+"
implementation "com.simsilica:lemur-props:1.0.+"
runtimeOnly 'org.codehaus.groovy:groovy-all:2.4.5'

compile "com.simsilica:pager:1.0.+"
compile "com.simsilica:sim-fx:1.0.+"
runtime "com.simsilica:sim-fx:1.0.+:assets"
implementation "com.simsilica:pager:1.0.+"
implementation "com.simsilica:sim-fx:1.0.+"
// It does not seem that SimFX has or should have an assets jar?
// runtimeOnly "com.simsilica:sim-fx:1.0.+:assets"

compile 'org.meta-jb:meta-jb-json:1.0.1'
implementation 'org.meta-jb:meta-jb-json:1.0.1'

compile 'org.slf4j:slf4j-api:1.7.13'
implementation 'org.slf4j:slf4j-api:1.7.13'

runtime files("assets")
runtimeOnly files("assets")
}


// Configuration to produce maven-repo style -sources and -javadoc jars
task sourcesJar(type: Jar) {
classifier = 'sources'
duplicatesStrategy = 'WARN'
archiveClassifier = 'sources'
from sourceSets.main.allSource
exclude '**/.backups'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

task assetsJar(type: Jar) {
classifier = 'assets'
archiveClassifier = 'assets'
from file('assets')
exclude '**/*.psd'
exclude '**/.backups'
Expand All @@ -84,4 +93,23 @@ artifacts {
archives assetsJar
}

task uberjar(type: Jar) {
from(configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}

archiveBaseName = 'sim-arboreal-editor-UBERJAR'
duplicatesStrategy = DuplicatesStrategy.WARN

manifest {
attributes 'Implementation-Title': 'SimArboreal-Editor',
'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Main-Class': mainClassName
}
}