Skip to content

Commit c59195d

Browse files
authored
Update main with modularized samples (#793)
Updates main branch to include modularized samples based on development work done during 200.0.0 and 200.1.0 that is now completed. Also adds two new samples: add a dynamic entity layer, and create and edit geometries
1 parent 30cea93 commit c59195d

File tree

1,272 files changed

+13047
-8434
lines changed

Some content is hidden

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

1,272 files changed

+13047
-8434
lines changed

Diff for: .github/scripts/ci/readme_metadata_style_check/README_style_checker.py

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
'ogc',
5252
'portal',
5353
'raster',
54+
'real_time',
5455
'scene',
5556
'search',
5657
'symbology',

Diff for: .github/scripts/ci/readme_metadata_style_check/entry.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
'ogc',
2525
'portal',
2626
'raster',
27+
'real_time',
2728
'scene',
2829
'search',
2930
'symbology',

Diff for: .github/scripts/ci/readme_metadata_style_check/metadata_style_checker.py

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
'ogc',
2626
'portal',
2727
'raster',
28+
'real_time',
2829
'scene',
2930
'search',
3031
'symbology',
@@ -152,6 +153,7 @@ def get_source_code_paths(self) -> typing.List[str]:
152153
results = list(filter(lambda x: 'build/' not in x, results)) # exclude \build folder
153154
results = list(filter(lambda x: 'out/' not in x, results)) # exclude \out folder
154155
results = list(filter(lambda x: 'Launcher' not in x, results)) # exclude *Launcher.java
156+
results = list(filter(lambda x: 'module-info' not in x, results)) # exclude module-info.java
155157
results = list(map(lambda x: x.replace(os.sep, '/'), results)) # eliminate double backslashes in the paths
156158

157159
return sorted(results)

Diff for: .github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
- v.next
11+
- v200.develop
1112

1213
# A workflow run is made up of one or more jobs that can run sequentially or
1314
# in parallel.

Diff for: analysis/analyze-hotspots/build.gradle

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'application'
3-
id 'org.openjfx.javafxplugin' version '0.0.13'
3+
id 'org.openjfx.javafxplugin' // version is defined in settings.gradle
44
}
55

66
group = 'com.esri.samples'
@@ -11,7 +11,12 @@ ext {
1111

1212
javafx {
1313
version = "17.0.2"
14-
modules = [ 'javafx.controls' ]
14+
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.fxml', 'javafx.web', 'javafx.media' ]
15+
}
16+
17+
application {
18+
mainModule = "com.esri.samples.analyze_hotspots"
19+
mainClass = "com.esri.samples.analyze_hotspots.AnalyzeHotspotsSample"
1520
}
1621

1722
compileJava.options.encoding = 'UTF-8'
@@ -65,22 +70,6 @@ run {
6570
systemProperty 'apiKey', apiKey
6671
}
6772
dependsOn copyNatives
68-
mainClassName = 'com.esri.samples.analyze_hotspots.AnalyzeHotspotsLauncher'
69-
}
70-
71-
jar {
72-
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
73-
manifest {
74-
attributes("Main-Class": "$mainClassName")
75-
}
76-
from {
77-
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
78-
}
79-
80-
// exclude signing files that come from dependencies
81-
exclude "META-INF/*.SF"
82-
exclude "META-INF/*.DSA"
83-
exclude "META-INF/*.RSA"
8473
}
8574

8675
task productionZip(type: Zip) {
@@ -91,6 +80,9 @@ task productionZip(type: Zip) {
9180
archiveBaseName = project.name
9281
}
9382

94-
wrapper {
95-
gradleVersion = '7.5'
83+
if (rootProject == project) {
84+
// the wrapper task is only used if this project is the root project i.e. not a subproject
85+
wrapper {
86+
gradleVersion = '7.5.1'
87+
}
9688
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: analysis/analyze-hotspots/settings.gradle

+8-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
rootProject.name = 'analyze-hotspots'
1+
pluginManagement {
2+
plugins {
3+
// version defined in settings.gradle to avoid version error when this sample is used in a multi-project build
4+
id 'org.openjfx.javafxplugin' version "0.0.13"
5+
}
6+
}
7+
8+
rootProject.name = 'analyze-hotspots'

Diff for: analysis/analyze-hotspots/src/main/java/com/esri/samples/analyze_hotspots/AnalyzeHotspotsLauncher.java

-11
This file was deleted.
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2022 Esri.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
module com.esri.samples.analyze_hotspots {
18+
// require ArcGIS Maps SDK for Java module
19+
requires com.esri.arcgisruntime;
20+
21+
// require JavaFX modules that the application uses
22+
requires javafx.graphics;
23+
requires javafx.controls;
24+
25+
// require other modules that the application uses
26+
requires java.sql;
27+
28+
exports com.esri.samples.analyze_hotspots;
29+
}

Diff for: analysis/distance-measurement-analysis/build.gradle

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'application'
3-
id 'org.openjfx.javafxplugin' version '0.0.13'
3+
id 'org.openjfx.javafxplugin' // version is defined in settings.gradle
44
}
55

66
group = 'com.esri.samples'
@@ -11,7 +11,12 @@ ext {
1111

1212
javafx {
1313
version = "17.0.2"
14-
modules = [ 'javafx.controls', 'javafx.fxml' ]
14+
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.fxml', 'javafx.web', 'javafx.media' ]
15+
}
16+
17+
application {
18+
mainModule = "com.esri.samples.distance_measurement_analysis"
19+
mainClass = "com.esri.samples.distance_measurement_analysis.DistanceMeasurementAnalysisSample"
1520
}
1621

1722
compileJava.options.encoding = 'UTF-8'
@@ -65,22 +70,6 @@ run {
6570
systemProperty 'apiKey', apiKey
6671
}
6772
dependsOn copyNatives
68-
mainClassName = 'com.esri.samples.distance_measurement_analysis.DistanceMeasurementAnalysisLauncher'
69-
}
70-
71-
jar {
72-
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
73-
manifest {
74-
attributes("Main-Class": "$mainClassName")
75-
}
76-
from {
77-
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
78-
}
79-
80-
// exclude signing files that come from dependencies
81-
exclude "META-INF/*.SF"
82-
exclude "META-INF/*.DSA"
83-
exclude "META-INF/*.RSA"
8473
}
8574

8675
task productionZip(type: Zip) {
@@ -91,6 +80,9 @@ task productionZip(type: Zip) {
9180
archiveBaseName = project.name
9281
}
9382

94-
wrapper {
95-
gradleVersion = '7.5'
83+
if (rootProject == project) {
84+
// the wrapper task is only used if this project is the root project i.e. not a subproject
85+
wrapper {
86+
gradleVersion = '7.5.1'
87+
}
9688
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
+8-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
rootProject.name = 'distance-measurement-analysis'
1+
pluginManagement {
2+
plugins {
3+
// version defined in settings.gradle to avoid version error when this sample is used in a multiproject build
4+
id 'org.openjfx.javafxplugin' version "0.0.13"
5+
}
6+
}
7+
8+
rootProject.name = 'distance-measurement-analysis'

Diff for: analysis/distance-measurement-analysis/src/main/java/com/esri/samples/distance_measurement_analysis/DistanceMeasurementAnalysisLauncher.java

-11
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright 2022 Esri.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
module com.esri.samples.distance_measurement_analysis {
18+
// require ArcGIS Maps SDK for Java module
19+
requires com.esri.arcgisruntime;
20+
21+
// require JavaFX modules that the application uses
22+
requires javafx.graphics;
23+
requires javafx.controls;
24+
requires javafx.fxml;
25+
26+
// make all @FXML annotated objects reflectively accessible to the javafx.fxml module
27+
opens com.esri.samples.distance_measurement_analysis to javafx.fxml;
28+
29+
exports com.esri.samples.distance_measurement_analysis;
30+
}

Diff for: analysis/distance-measurement-analysis/src/main/resources/distance_measurement_analysis/main.fxml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<?import javafx.scene.paint.Color?>
2323
<?import javafx.geometry.Insets?>
2424
<StackPane fx:controller="com.esri.samples.distance_measurement_analysis.DistanceMeasurementAnalysisController"
25-
xmlns:fx="http://javafx.com/fxml" stylesheets="/distance_measurement_analysis/style.css">
25+
xmlns:fx="http://javafx.com/fxml" stylesheets="@style.css">
2626
<SceneView fx:id="sceneView"/>
2727
<VBox StackPane.alignment="TOP_LEFT" maxWidth="250" maxHeight="50" styleClass="panel-region">
2828
<padding>

Diff for: analysis/line-of-sight-geoelement/build.gradle

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'application'
3-
id 'org.openjfx.javafxplugin' version '0.0.13'
3+
id 'org.openjfx.javafxplugin' // version is defined in settings.gradle
44
}
55

66
group = 'com.esri.samples'
@@ -11,7 +11,12 @@ ext {
1111

1212
javafx {
1313
version = "17.0.2"
14-
modules = [ 'javafx.controls' ]
14+
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.fxml', 'javafx.web', 'javafx.media' ]
15+
}
16+
17+
application {
18+
mainModule = "com.esri.samples.line_of_sight_geoelement"
19+
mainClass = "com.esri.samples.line_of_sight_geoelement.LineOfSightGeoElementSample"
1520
}
1621

1722
compileJava.options.encoding = 'UTF-8'
@@ -65,22 +70,6 @@ run {
6570
systemProperty 'apiKey', apiKey
6671
}
6772
dependsOn copyNatives
68-
mainClassName = 'com.esri.samples.line_of_sight_geoelement.LineOfSightGeoElementLauncher'
69-
}
70-
71-
jar {
72-
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
73-
manifest {
74-
attributes("Main-Class": "$mainClassName")
75-
}
76-
from {
77-
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
78-
}
79-
80-
// exclude signing files that come from dependencies
81-
exclude "META-INF/*.SF"
82-
exclude "META-INF/*.DSA"
83-
exclude "META-INF/*.RSA"
8473
}
8574

8675
task productionZip(type: Zip) {
@@ -94,6 +83,9 @@ task productionZip(type: Zip) {
9483
archiveBaseName = project.name
9584
}
9685

97-
wrapper {
98-
gradleVersion = '7.5'
86+
if (rootProject == project) {
87+
// the wrapper task is only used if this project is the root project i.e. not a subproject
88+
wrapper {
89+
gradleVersion = '7.5.1'
90+
}
9991
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: analysis/line-of-sight-geoelement/settings.gradle

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
pluginManagement {
2+
plugins {
3+
// version defined in settings.gradle to avoid version error when this sample is used in a multiproject build
4+
id 'org.openjfx.javafxplugin' version "0.0.13"
5+
}
6+
}
7+
18
rootProject.name = 'line-of-sight-geoelement'
29

310
// download sample data

Diff for: analysis/line-of-sight-geoelement/src/main/java/com/esri/samples/line_of_sight_geoelement/LineOfSightGeoElementLauncher.java

-27
This file was deleted.

0 commit comments

Comments
 (0)