Skip to content

Commit fcc045e

Browse files
authored
Merge pull request #93 from Esri/release
Release
2 parents fc2e769 + e3df907 commit fcc045e

File tree

608 files changed

+5697
-22594
lines changed

Some content is hidden

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

608 files changed

+5697
-22594
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ local.properties
99

1010
# Intellij project files
1111
*.ipr
12-
*.iml
1312
.idea/
1413

1514
# Eclipse
@@ -35,3 +34,6 @@ local.properties
3534
Icon?
3635
ehthumbs.db
3736
Thumbs.db
37+
/samples-data/
38+
/jniLibs/
39+
/resources/

README.md

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,52 @@
11
# ArcGIS Runtime Java SDK Samples
2-
### Quartz Beta 2
2+
### 100.0.0
33
This project includes a set of samples demonstrating how to accomplish various mapping and GIS tasks with the ArcGIS Runtime SDK for Java.
44

5-
These samples are built with Gradle. If you want to learn more about Gradle, learn more from [Gradle's guide]
6-
(https://docs.gradle.org/current/userguide/userguide.html). The samples project has a Gradle multi-project structure.
5+
These samples are built with Gradle. If you want to learn more about Gradle, learn more from [Gradle's guide](https://docs.gradle.org/current/userguide/userguide.html).
76

8-
This guide has instructions for running samples using the command line or with the Eclipse and IntelliJ IDEA IDEs.
7+
This guide has instructions for running samples using the command line or with Eclipse and IntelliJ IDEA.
98

109
For developers new to Git, please see the wiki page for how to [clone this repository](https://github.com/Esri/arcgis-runtime-samples-java/wiki/working-with-git).
1110

1211
## Running the Samples
13-
To run the samples in a terminal, `cd` into the project and call the gradle run task for the sample:
12+
To run the samples in a terminal, `cd` into the project and call the gradle `run` task, supplying the sample main class:
1413

1514
On Linux/Mac
1615
```
17-
$ ./gradlew :display-information:show-callout:run
16+
$ ./gradlew run -PmainClass="com.esri.samples.scene.display_scene.DisplaySceneSample"
1817
```
1918

2019
On Windows
2120
```
22-
> gradlew.bat :display-information:show-callout:run
21+
> gradlew.bat run -PmainClass="com.esri.samples.scene.display_scene.DisplaySceneSample"
2322
```
2423

24+
If no `mainClass` property is supplied, the default sample (set in the build.gradle file) will be run.
25+
2526
There is no need to install Gradle to run the samples.
2627

28+
## The ArcGIS Runtime Gradle Plugin
29+
The plugin provides the project with everything an ArcGIS runtime project needs to run. It adds the
30+
arcgis api as a dependency and downloads the native libraries into `$USER_HOME/.arcgis`. This download occurs
31+
automatically the first time you build the project and is only performed once.
32+
33+
## Offline sample data
34+
Some samples require offline data. A `samples-data` directory will automatically download to the project root the
35+
first time you call the `run` task.
36+
2737
## Importing into an IDE
28-
We will step through how to import the Samples project into Eclipse and IntelliJ IDEA. In both IDEs you can choose to
29-
import all the samples, just a category of samples, or a single sample.
38+
We will step through how to import the Samples project into Eclipse and IntelliJ IDEA. Other IDEs may support Gradle too. Please consult their documentation for importing Gradle projects.
3039

3140
### IntelliJ IDEA
3241
After cloning the samples, open IntelliJ IDEA and follow these steps:
3342

3443
1. Click *Import Projects* from the Welcome Screen or select *File > New > Project from Existing Sources*.
35-
2. In the select path dialog, select the root `build.gradle` file in the `arcgis-runtime-samples-java` directory. If you only want to import a category of samples, select the `build.gradle` file in that category directory. To import just one sample, select the `build.gradle` file from the sample's directory. Click *OK* after specifying the `build.gradle` file.
44+
2. In the select path dialog, select the `build.gradle` file in the `arcgis-runtime-samples-java` directory. Click *OK* after specifying the `build.gradle` file.
3645
3. Click *OK* at the next dialog to complete the import.
3746

3847
<img src="./intellij_proj.png" alt="IntelliJ IDEA project structure" height="200">
3948

40-
To view all of the gradle tasks including the Run task, go to *View > Tool Windows > Gradle*. Select the Run task in the sample's task list to run the sample.
49+
To view all of the gradle tasks including the Run task, go to *View > Tool Windows > Gradle*.
4150

4251
Alternatively, you can open the sample's main class, right-click, and select *Run* from the dropdown menu.
4352

@@ -46,34 +55,22 @@ To import the samples with Eclipse's default gradle plugin, follow these steps:
4655

4756
1. Open Eclipse and select *File > Import*.
4857
2. In the import wizard, choose *Gradle > Gradle Project*, then click Next.
49-
3. Select the `arcgis-runtime-samples-java` directory as the project root directory. If you choose a category or sample directory as the root, only those samples will be imported.
58+
3. Select the `arcgis-runtime-samples-java` directory as the project root directory.
5059
4. Click *finish* to complete the import.
5160

52-
By default, Eclipse shows each sub-project as a separate project in the workspace. If you want to see the samples in a nested folder view, follow these steps:
53-
54-
1. Open the Project Explorer view by selected *Window > Show view > Project Explorer*.
55-
2. Click the down-arrow in the top-right corner of the Project Explorer window OR press Ctrl + F10 with the Project
56-
Explorer window selected.
57-
3. In the dropdown menu that appears, select *Projects Presentation > Hierarchical*. Eclipse should now show the
58-
samples as a single, nested project. You may need to restart Eclipse for the change to occur.
59-
6061
<img src="./eclipse_proj.png" alt="Eclipse project structure" height="200">
6162

62-
###Other IDEs###
63-
Other IDEs may support Gradle too. Please consult their documentation for importing Gradle projects.
64-
65-
##Resources##
63+
## Resources
6664
* [ArcGIS Runtime SDK for Java](https://developers.arcgis.com/java/)
6765
* [ArcGIS Blog](https://blogs.esri.com/esri/arcgis/)
6866
* [Esri Twitter](https://twitter.com/esri)
6967

70-
##Contributing##
71-
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing]
72-
(https://github.com/esri/contributing).
68+
## Contributing
69+
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
7370

7471
Find a bug or want a new feature? Please let us know by submitting an issue.
7572

76-
##Licensing##
73+
## Licensing
7774
Copyright 2016 Esri
7875

7976
Licensed under the Apache License, Version 2.0 (the "License"); you may not

build.gradle

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,53 @@
1-
allprojects {
2-
apply plugin: 'java'
3-
apply plugin: 'eclipse'
1+
apply plugin: 'com.esri.arcgisruntime.java'
2+
apply plugin: 'application'
3+
apply plugin: 'idea'
4+
apply plugin: 'eclipse'
5+
6+
buildscript {
7+
repositories {
8+
maven {
9+
url 'https://esri.bintray.com/arcgis'
10+
}
11+
}
12+
dependencies {
13+
classpath 'com.esri.arcgisruntime:gradle-arcgis-java-plugin:1.0.0'
14+
}
415
}
16+
17+
arcgis.version = '100.0.0'
18+
19+
idea.module.downloadJavadoc = true
20+
eclipse.classpath.downloadJavadoc = true
21+
22+
dependencies {
23+
compile 'org.controlsfx:controlsfx:8.40.10'
24+
compile 'org.jooq:joox:1.4.0'
25+
}
26+
27+
task downloadData {
28+
description = "Downloads data from AGOL for samples with offline data"
29+
30+
def rootDir = "./"
31+
def dataZip = rootDir + 'data.zip'
32+
def samplesData = rootDir + 'samples-data'
33+
34+
if (!file(samplesData).exists()) {
35+
ant.get(src: 'https://arcgisruntime.maps.arcgis' +
36+
'.com/sharing/rest/content/items/8b10b52320464b1bb728e552cfa6cb50/data', dest: dataZip)
37+
copy {
38+
from zipTree(dataZip)
39+
into(rootDir)
40+
}
41+
delete(dataZip)
42+
}
43+
}
44+
45+
run {
46+
mainClassName = project.hasProperty("mainClass") ? mainClass : 'com.esri.samples.map.display_map.DisplayMapSample'
47+
}
48+
49+
task wrapper(type: Wrapper) {
50+
gradleVersion = '3.0'
51+
}
52+
53+
run.dependsOn downloadData

display-information/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

display-information/add-graphics-with-renderer/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

display-information/add-graphics-with-renderer/README.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

display-information/add-graphics-with-renderer/build.gradle

Lines changed: 0 additions & 18 deletions
This file was deleted.

display-information/add-graphics-with-renderer/settings.gradle

Whitespace-only changes.

display-information/add-graphics-with-symbols/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

display-information/add-graphics-with-symbols/README.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)