-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathbuild.gradle
81 lines (68 loc) · 1.93 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}
group = 'com.esri.samples'
ext {
arcgisVersion = '100.14.0'
}
javafx {
version = "11.0.2"
modules = [ 'javafx.controls' ]
}
compileJava.options.encoding = 'UTF-8'
repositories {
mavenCentral()
maven {
url 'https://esri.jfrog.io/artifactory/arcgis'
}
maven {
url 'https://olympus.esri.com/artifactory/arcgisruntime-repo'
}
}
configurations {
natives
}
dependencies {
implementation "com.esri.arcgisruntime:arcgis-java:$arcgisVersion"
natives "com.esri.arcgisruntime:arcgis-java-jnilibs:$arcgisVersion"
natives "com.esri.arcgisruntime:arcgis-java-resources:$arcgisVersion"
// handle SLF4J http://www.slf4j.org/codes.html#StaticLoggerBinder
runtimeOnly 'org.slf4j:slf4j-nop:1.7.32'
}
task copyNatives(type: Copy) {
description = "Copies the arcgis native libraries into the project build directory for development."
group = "build"
configurations.natives.asFileTree.each {
from(zipTree(it))
}
// store native libraries in a common location shared with other samples
into "${System.properties.getProperty("user.home")}/.arcgis/$arcgisVersion"
}
run {
dependsOn copyNatives
mainClassName = 'com.esri.samples.feature_layer_rendering_mode_map.FeatureLayerRenderingModeMapLauncher'
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes("Main-Class": "$mainClassName")
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
// exclude signing files that come from dependencies
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
task productionZip(type: Zip) {
group = 'distribution'
from copyNatives
from jar.destinationDirectory
into (project.name)
archiveBaseName = project.name
}
wrapper {
gradleVersion = '7.3'
}