1 | apply plugin: 'eclipse'
|
---|
2 | apply plugin: 'findbugs'
|
---|
3 | apply plugin: 'idea'
|
---|
4 | apply plugin: 'jacoco'
|
---|
5 | apply plugin: 'java'
|
---|
6 | apply plugin: 'pmd'
|
---|
7 |
|
---|
8 | configurations {
|
---|
9 | compile.extendsFrom(requiredPlugin)
|
---|
10 | }
|
---|
11 |
|
---|
12 | apply from: 'gradle/manifest.gradle'
|
---|
13 | apply from: 'gradle/josm-tasks.gradle'
|
---|
14 | apply from: 'gradle/tool-config.gradle'
|
---|
15 |
|
---|
16 | sourceCompatibility = '1.8'
|
---|
17 |
|
---|
18 | repositories {
|
---|
19 | // for JUnit
|
---|
20 | mavenCentral()
|
---|
21 | //for josm-(latest|tested).jar
|
---|
22 | ivy {
|
---|
23 | url 'https://josm.openstreetmap.de/download'
|
---|
24 | layout 'pattern', {
|
---|
25 | artifact "[artifact]-[revision].jar"
|
---|
26 | artifact "[artifact]-snapshot-[revision].jar"
|
---|
27 | artifact "Archiv/[artifact]-snapshot-[revision].jar"
|
---|
28 | }
|
---|
29 | }
|
---|
30 | //for josm-plugins
|
---|
31 | ivy {
|
---|
32 | url "https://svn.openstreetmap.org/applications/editors/josm/dist/"
|
---|
33 | layout "pattern", {
|
---|
34 | artifact "[artifact].jar"
|
---|
35 | }
|
---|
36 | }
|
---|
37 | }
|
---|
38 |
|
---|
39 | dependencies {
|
---|
40 | /**
|
---|
41 | * The JOSM-version can be specified as "latest", "tested" or the numeric version number.
|
---|
42 | * When using a numeric version number you can leave out {changing=true}.
|
---|
43 | *
|
---|
44 | * Please check for numeric versions, if that specific version is available for download from https://josm.openstreetmap.de/download/ .
|
---|
45 | * If not, choose the next higher number that is available, or the gradle build will break.
|
---|
46 | */
|
---|
47 | compile(':josm:10583')
|
---|
48 | // For plugins it's irrelevant, which version is specified, always the latest version is used.
|
---|
49 | requiredPlugin (name: 'apache-commons'){changing=true}
|
---|
50 | requiredPlugin (name: 'apache-http'){changing=true}
|
---|
51 |
|
---|
52 | testCompile 'junit:junit:4.12'
|
---|
53 | }
|
---|
54 |
|
---|
55 | sourceSets {
|
---|
56 | main {
|
---|
57 | java {
|
---|
58 | srcDirs = ['src']
|
---|
59 | }
|
---|
60 | resources {
|
---|
61 | srcDirs = ["$projectDir"]
|
---|
62 | include 'data/**'
|
---|
63 | include 'images/**'
|
---|
64 | include 'README'
|
---|
65 | include 'LICENSE*'
|
---|
66 | }
|
---|
67 | }
|
---|
68 | test {
|
---|
69 | java {
|
---|
70 | srcDirs = ['test/unit']
|
---|
71 | }
|
---|
72 | resources{
|
---|
73 | srcDirs = ['test/data']
|
---|
74 | }
|
---|
75 | }
|
---|
76 | }
|
---|
77 |
|
---|
78 | eclipse {
|
---|
79 | project {
|
---|
80 | name = 'JOSM-Mapillary'
|
---|
81 | comment = property('plugin.description')
|
---|
82 | natures 'org.sonarlint.eclipse.core.sonarlintNature', 'ch.acanda.eclipse.pmd.builder.PMDNature', 'org.eclipse.buildship.core.gradleprojectnature'
|
---|
83 | buildCommand 'org.sonarlint.eclipse.core.sonarlintBuilder'
|
---|
84 | buildCommand 'ch.acanda.eclipse.pmd.builder.PMDBuilder'
|
---|
85 | buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
|
---|
86 | }
|
---|
87 | }
|
---|
88 | eclipseClasspath.dependsOn cleanEclipseClasspath
|
---|
89 | eclipseProject.dependsOn cleanEclipseProject
|
---|
90 | tasks.eclipse.dependsOn = ['eclipseClasspath', 'eclipseProject']
|
---|
91 |
|
---|
92 | tasks.withType(Javadoc) {
|
---|
93 | failOnError false
|
---|
94 | }
|
---|
95 |
|
---|
96 | test {
|
---|
97 | testLogging {
|
---|
98 | exceptionFormat "full"
|
---|
99 | events "started", "passed", "skipped", "failed", "standardOut", "standardError"
|
---|
100 | }
|
---|
101 | }
|
---|