Skip to content

Commit df4ce04

Browse files
authored
remove use of arcgis gradle plugin (#338)
* remove use of arcgis gradle plugin
1 parent b856bd1 commit df4ce04

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ If no `mainClass` property is supplied, the default sample (set in the build.gra
2727

2828
There is no need to install Gradle to run the samples.
2929

30-
## The ArcGIS Runtime Gradle Plugin
31-
The plugin provides the project with everything an ArcGIS runtime project needs to run. It adds the
32-
arcgis api as a dependency and downloads the native libraries into `$USER_HOME/.arcgis`. This download occurs
33-
automatically the first time you build the project and is only performed once.
34-
3530
## Java 11
3631
Java 11 users may find exceptions when running the project if their library path is still set for Oracle JDK 1.8 (see the [OpenJavaFX docs](https://openjfx.io/openjfx-docs/) for more information). A workaround for this is to add the following argument in the `run` task of the Gradle buildscript:
3732
```

build.gradle

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
1-
buildscript {
2-
repositories {
3-
maven {
4-
url 'https://esri.bintray.com/arcgis'
5-
}
6-
}
7-
dependencies {
8-
classpath 'com.esri.arcgisruntime:gradle-arcgis-java-plugin:1.0.0'
9-
}
10-
}
11-
121
plugins {
132
id 'application'
143
id 'org.openjfx.javafxplugin' version '0.0.5'
154
}
165

17-
apply plugin: 'com.esri.arcgisruntime.java'
18-
196
group = 'com.esri.samples'
207

21-
arcgis.version = '100.5.0'
8+
ext {
9+
arcgisVersion = '100.6.0-2431'
10+
}
2211

2312
javafx {
2413
version = "11.0.1"
@@ -32,9 +21,19 @@ repositories {
3221
maven {
3322
url 'https://esri.bintray.com/arcgis'
3423
}
24+
maven {
25+
url 'http://olympus.esri.com/artifactory/arcgisruntime-repo'
26+
}
27+
}
28+
29+
configurations {
30+
natives
3531
}
3632

3733
dependencies {
34+
compile "com.esri.arcgisruntime:arcgis-java:$arcgisVersion"
35+
natives "com.esri.arcgisruntime:arcgis-java-jnilibs:$arcgisVersion"
36+
natives "com.esri.arcgisruntime:arcgis-java-resources:$arcgisVersion"
3837
compile 'com.esri.arcgisruntime:arcgis-java-toolkit:100.2.1'
3938
compile 'commons-io:commons-io:2.4'
4039
compile 'org.jooq:joox:1.4.0'
@@ -82,8 +81,19 @@ task downloadData {
8281
downloadSampleData([new Download(id: '628e8e3521cf45e9a28a12fe10c02c4d', name: 'naperville_imagery', ext: 'tpk')], 'naperville')
8382
}
8483

84+
task copyNatives(type: Copy) {
85+
description = "Copies the arcgis native libraries into the project build directory for development."
86+
group = "build"
87+
configurations.natives.asFileTree.each {
88+
from(zipTree(it))
89+
}
90+
into "build/natives"
91+
}
92+
8593
run {
94+
dependsOn copyNatives
8695
mainClassName = project.hasProperty("mainClass") ? mainClass : 'com.esri.samples.map.display_map.DisplayMapSample'
96+
environment "ARCGISRUNTIMESDKJAVA_100_6_0", "build/natives"
8797
}
8898

8999
task wrapper(type: Wrapper) {

0 commit comments

Comments
 (0)