Skip to content

Commit 6972756

Browse files
committed
Finish 1.0.0
2 parents 3161088 + 1583921 commit 6972756

246 files changed

Lines changed: 5166 additions & 3464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.12
1+
1.0.0

bitbucket-pipelines.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
# You can specify a custom docker image from Docker Hub as your build environment.
66
# image: atlassian/default-image:latest
77

8+
image: java:8
89
pipelines:
910
default:
1011
- step:
12+
caches:
13+
- gradle
1114
script:
12-
- echo "Everything is awesome!"
15+
- apt-get update
16+
- apt-get install -y openjfx
17+
- bash ./gradlew install

build-native.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project name="jME SpaceShift Editor" default="do-deploy" basedir="native-build"
33
xmlns:fx="javafx:com.sun.javafx.tools.ant">
44

5-
<property name="editor.version" value="0.9.12"/>
5+
<property name="editor.version" value="1.0.0"/>
66
<property environment="env"/>
77

88
<condition property="gradle.executable" value="${env.GRADLE_HOME}/bin/gradle.bat"
@@ -37,6 +37,7 @@
3737
<delete dir="projectRefs"/>
3838
<delete dir="deploy"/>
3939
<delete dir="dist"/>
40+
<delete dir="embedded-plugins"/>
4041

4142
<mkdir dir="externalLibs"/>
4243

@@ -65,6 +66,11 @@
6566
</fileset>
6667
</copy>
6768

69+
<mkdir dir="embedded-plugins"/>
70+
<copy todir="embedded-plugins">
71+
<fileset dir="../embedded-plugins" />
72+
</copy>
73+
6874
<mkdir dir="projectRefs"/>
6975
</target>
7076

@@ -118,6 +124,7 @@
118124
<mkdir dir="dist"/>
119125
<mkdir dir="dist/libs"/>
120126
<mkdir dir="dist/licenses"/>
127+
<mkdir dir="dist/embedded-plugins"/>
121128

122129
<copy todir="dist/licenses">
123130
<fileset dir="licenses">
@@ -131,17 +138,22 @@
131138
</fileset>
132139
</copy>
133140

141+
<copy todir="dist/embedded-plugins">
142+
<fileset dir="embedded-plugins" />
143+
</copy>
144+
134145
<copy todir="dist/libs">
135146
<fileset dir="externalLibs">
136147
<include name="*"/>
137148
</fileset>
138149
</copy>
139150

140-
<fx:resources id="appRes">
151+
<fx:resources id="appRes" >
141152
<fx:fileset dir="dist" includes="jme3-spaceshift-editor.jar"/>
142153
<fx:fileset dir="dist" includes="licenses/*"/>
143154
<fx:fileset dir="dist" includes="licenses/libraries-licenses/*"/>
144155
<fx:fileset dir="dist" includes="libs/*"/>
156+
<fx:fileset dir="dist" includes="embedded-plugins/*/*"/>
145157
<fx:fileset dir="package"/>
146158
</fx:resources>
147159

build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ apply plugin: 'idea'
1313
apply plugin: 'org.junit.platform.gradle.plugin'
1414

1515
group = 'com.spaceshift'
16-
version = '0.9.12'
16+
version = '1.0.0'
1717

1818
sourceCompatibility = 1.8
1919
targetCompatibility = 1.8
@@ -58,8 +58,8 @@ dependencies {
5858
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.7-M5'
5959

6060
compile 'com.github.JavaSaBr:RlibFX:4.1.2'
61-
compile 'com.github.JavaSaBr:RLib:6.3.0'
62-
compile 'com.github.JavaSaBr:JME3-JFX:1.5.5'
61+
compile 'com.github.JavaSaBr:RLib:6.3.4'
62+
compile 'com.github.JavaSaBr:JME3-JFX:1.6.1'
6363

6464
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
6565
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
@@ -125,10 +125,10 @@ dependencies {
125125
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
126126

127127
// extensions
128-
compile ('com.github.JavaSaBr:jme3-spaceshift-extension:1.5.0') {
128+
compile ('com.github.JavaSaBr:jme3-spaceshift-extension:1.5.2') {
129129
exclude group: 'org.jmonkeyengine'
130130
}
131-
compile ('com.github.JavaSaBr:tonegodemitter:2.3.0') {
131+
compile ('com.github.JavaSaBr:tonegodemitter:2.3.4') {
132132
exclude group: 'org.jmonkeyengine'
133133
}
134134

@@ -172,6 +172,10 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
172172
from javadoc.destinationDir
173173
}
174174

175+
task wrapper(type: Wrapper) {
176+
gradleVersion = '4.1'
177+
}
178+
175179
artifacts {
176180
archives sourcesJar
177181
archives javadocJar
Binary file not shown.

gradle/wrapper/gradle-wrapper.jar

53.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Thu Aug 10 08:06:48 MSK 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip

gradlew

100644100755
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
package com.jme3.terrain.executor;
2+
3+
import java.util.concurrent.*;
4+
import java.util.concurrent.atomic.AtomicInteger;
5+
6+
/**
7+
* The class to provide single executor service to run background tasks of terrain staff.
8+
*
9+
* @author JavaSaBr
10+
*/
11+
public class TerrainExecutorService {
12+
13+
private static final Runtime RUNTIME = Runtime.getRuntime();
14+
15+
/**
16+
* The constructor of the terrain executor service.
17+
*/
18+
private static volatile Callable<ExecutorService> constructor = new Callable<ExecutorService>() {
19+
20+
@Override
21+
public ExecutorService call() throws Exception {
22+
return Executors.newFixedThreadPool(RUNTIME.availableProcessors(), new ThreadFactory() {
23+
24+
private final AtomicInteger counter = new AtomicInteger(-1);
25+
26+
@Override
27+
public Thread newThread(final Runnable task) {
28+
final Thread thread = new Thread(task);
29+
thread.setName("jME3 Terrain Thread [" + counter.incrementAndGet() + "]");
30+
thread.setDaemon(true);
31+
return thread;
32+
}
33+
});
34+
}
35+
};
36+
37+
/**
38+
* Set a new constructor of executor service to provide other implementation.
39+
*
40+
* @param constructor the constructor.
41+
*/
42+
private static void setConstructor(final Callable<ExecutorService> constructor) {
43+
TerrainExecutorService.constructor = constructor;
44+
}
45+
46+
/**
47+
* https://stackoverflow.com/questions/29883403/double-checked-locking-without-volatile
48+
* <p>
49+
* This suggestion is of Aleksey Shipilev
50+
*/
51+
private static class LazyInitializer {
52+
public final TerrainExecutorService instance;
53+
public LazyInitializer(final TerrainExecutorService instance) {
54+
this.instance = instance;
55+
}
56+
}
57+
58+
/**
59+
* The lazy singleton.
60+
*/
61+
private static LazyInitializer initializer;
62+
63+
public static TerrainExecutorService getInstance() {
64+
65+
LazyInitializer lazy = initializer;
66+
67+
if (lazy == null) { // check 1
68+
synchronized (TerrainExecutorService.class) {
69+
lazy = initializer;
70+
if (lazy == null) { // check2
71+
lazy = new LazyInitializer(new TerrainExecutorService());
72+
initializer = lazy;
73+
}
74+
}
75+
}
76+
77+
return lazy.instance;
78+
}
79+
80+
/**
81+
* The implementation of executor service.
82+
*/
83+
private final ExecutorService executorService;
84+
85+
private TerrainExecutorService() {
86+
try {
87+
this.executorService = constructor.call();
88+
} catch (final Exception e) {
89+
throw new RuntimeException(e);
90+
}
91+
}
92+
93+
public <T> Future<T> submit(final Callable<T> task) {
94+
return executorService.submit(task);
95+
}
96+
97+
public <T> Future<T> submit(final Runnable task, final T result) {
98+
return executorService.submit(task, result);
99+
}
100+
101+
public Future<?> submit(final Runnable task) {
102+
return executorService.submit(task);
103+
}
104+
105+
public void execute(final Runnable command) {
106+
executorService.execute(command);
107+
}
108+
}

0 commit comments

Comments
 (0)