source: subversion/applications/editors/josm/plugins/mapillary/build.gradle @ 32840

Last change on this file since 32840 was 32693, checked in by floscher, 4 years ago

[mapillary] Clean up build.gradle

The build file for Gradle is now split in several parts for a better overview and better maintainability.
The files gradle/*.gradle are parts that are unlikely to change often, because these are not specific to this plugin and can be configured through gradle.properties.
Also the Gradle version is bumped to 2.14.1, because a critical defect has been fixed since 2.14 (see https://docs.gradle.org/2.14.1/release-notes).

File size: 2.6 KB
Line 
1apply plugin: 'eclipse'
2apply plugin: 'findbugs'
3apply plugin: 'idea'
4apply plugin: 'jacoco'
5apply plugin: 'java'
6apply plugin: 'pmd'
7
8configurations {
9  compile.extendsFrom(requiredPlugin)
10}
11
12apply from: 'gradle/manifest.gradle'
13apply from: 'gradle/josm-tasks.gradle'
14apply from: 'gradle/tool-config.gradle'
15
16sourceCompatibility = '1.8'
17
18repositories {
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
39dependencies {
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
55sourceSets {
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
78eclipse {
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}
88eclipseClasspath.dependsOn cleanEclipseClasspath
89eclipseProject.dependsOn cleanEclipseProject
90tasks.eclipse.dependsOn = ['eclipseClasspath', 'eclipseProject']
91
92tasks.withType(Javadoc) {
93  failOnError false
94}
95
96test {
97  testLogging {
98    exceptionFormat "full"
99    events "started", "passed", "skipped", "failed", "standardOut", "standardError"
100  }
101}
Note: See TracBrowser for help on using the repository browser.