source: osm/applications/editors/josm/plugins/mapillary/build.gradle@ 31445

Last change on this file since 31445 was 31426, checked in by floscher, 11 years ago

Remove scribe-dependency and add new AWS-dependency instead

File size: 3.9 KB
Line 
1apply plugin: 'eclipse'
2apply plugin: 'findbugs'
3apply plugin: 'jacoco'
4apply plugin: 'java'
5apply plugin: 'project-report'
6
7sourceCompatibility = '1.7'
8
9configurations {
10 packIntoJar
11 compile.extendsFrom packIntoJar
12}
13repositories {
14 // for JUnit
15 mavenCentral()
16 // for commons-imaging
17 maven {
18 url "https://repository.apache.org/content/repositories/snapshots/"
19 }
20 //for josm-(latest|tested).jar
21 ivy {
22 url "https://josm.openstreetmap.de/download/"
23 layout "pattern", {
24 artifact "[artifact]-[revision].jar"
25 }
26 }
27}
28dependencies {
29 // The JOSM-version can be specified as "latest", "tested" or "snapshot-1234" (replace 1234 by the desired version number).
30 // For revisions older than the last ~60 versions, also append "Archiv" to the repository URL above
31 compile 'org.openstreetmap.josm:josm:tested'
32 compile 'org.apache.commons:commons-imaging:1.0-SNAPSHOT'
33
34 packIntoJar 'com.amazonaws:aws-java-sdk-s3:1.10.8'
35
36 testCompile 'junit:junit:4.12'
37}
38
39sourceSets {
40 main {
41 java {
42 srcDirs = ['src']
43 }
44 resources {
45 srcDirs = ["$projectDir"]
46 include 'data/**'
47 include 'images/**'
48 include 'README'
49 include 'GPL-v*.txt'
50 }
51 }
52 test {
53 java {
54 srcDirs = ['test/unit']
55 }
56 resources{
57 srcDirs = ['test/data']
58 }
59 }
60}
61
62build.dependsOn jacocoTestReport
63build.dependsOn projectReport
64
65/** Eclipse configuration */
66eclipse {
67 classpath {
68 downloadSources=true
69 downloadJavadoc=true
70 }
71}
72
73/** FindBugs configuration */
74findbugs {
75 toolVersion = "3.0.1"
76 ignoreFailures = true
77 effort = "min"
78 reportLevel = "high"
79}
80tasks.withType(FindBugs) {
81 reports {
82 xml.enabled = false
83 html.enabled = true
84 }
85}
86
87/** JaCoCo configuration */
88jacoco {
89 toolVersion = "0.7.5.201505241946"
90}
91jacocoTestReport {
92 reports {
93 xml.enabled true
94 html.destination "$buildDir/reports/jacoco"
95 }
96}
97
98test {
99 testLogging {
100 exceptionFormat "full"
101 events "started", "passed", "skipped", "failed", "standardOut", "standardError"
102 }
103}
104
105jar {
106 from configurations.packIntoJar.collect { it.isDirectory() ? it : zipTree(it) }
107 manifest {
108 attributes("Plugin-Mainversion": "8433",
109 "Plugin-Version": "31395",
110 "Plugin-Class": "org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin",
111 "Plugin-Description": "Enables user to work with pictures hosted at mapillary.com",
112 "Plugin-Date": String.format("%1\$tY-%1\$tm-%1\$tdT%1\$tH:%1\$tM:%1\$tS%1\$tz", new GregorianCalendar()),
113 "Author": "nokutu <nokutu@openmailbox.org>",
114 "Plugin-Link": "https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Mapillary",
115 "Plugin-Icon": "images/icon24.png",
116 "Plugin-Requires": "commons-imaging",
117 "Plugin-Canloadatruntime": "true")
118 }
119}
120
121/**
122 * The following are tasks to directly run JOSM with the freshly-built
123 * Mapillary-plugin already installed.
124 * Only prerequisite is to have JOSM (or JOSM-latest) installed on your machine.
125 * Previously installed versions of the plugin are overridden by executions of these tasks.
126 **/
127
128task installPluginToJosm(type: Copy) {
129 from "$buildDir/libs/josm-mapillary-plugin.jar"
130 into "$System.env.HOME/.josm/plugins"
131 rename '.*', 'Mapillary.jar'
132}
133installPluginToJosm.dependsOn jar
134
135task runJosm(type: Exec) {
136 commandLine 'josm'
137}
138runJosm.dependsOn installPluginToJosm
139
140task installPluginToJosmLatest(type: Copy) {
141 from "$buildDir/libs/josm-mapillary-plugin.jar"
142 into "$System.env.HOME/.josm-latest/plugins"
143 rename '.*', 'Mapillary.jar'
144}
145installPluginToJosmLatest.dependsOn jar
146
147task runJosmLatest(type: Exec) {
148 commandLine 'josm-latest'
149}
150runJosmLatest.dependsOn installPluginToJosmLatest
151
152/** Wrapper task:
153 * This only needs to be run once when the Gradle version changes.
154 * The changed files (probably in the gradle/-folder) should then be commited to CVS.
155 */
156task wrapper(type: Wrapper) {
157 gradleVersion = '2.5'
158}
Note: See TracBrowser for help on using the repository browser.