[31393] | 1 | apply plugin: 'eclipse'
|
---|
| 2 | apply plugin: 'findbugs'
|
---|
[32340] | 3 | apply plugin: 'idea'
|
---|
[31393] | 4 | apply plugin: 'jacoco'
|
---|
| 5 | apply plugin: 'java'
|
---|
[32063] | 6 | apply plugin: 'pmd'
|
---|
[31393] | 7 |
|
---|
[32693] | 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 |
|
---|
[32680] | 16 | sourceCompatibility = '1.8'
|
---|
[31393] | 17 |
|
---|
| 18 | repositories {
|
---|
| 19 | // for JUnit
|
---|
| 20 | mavenCentral()
|
---|
| 21 | //for josm-(latest|tested).jar
|
---|
| 22 | ivy {
|
---|
[31784] | 23 | url 'https://josm.openstreetmap.de/download'
|
---|
| 24 | layout 'pattern', {
|
---|
[31393] | 25 | artifact "[artifact]-[revision].jar"
|
---|
[31784] | 26 | artifact "[artifact]-snapshot-[revision].jar"
|
---|
| 27 | artifact "Archiv/[artifact]-snapshot-[revision].jar"
|
---|
[31393] | 28 | }
|
---|
| 29 | }
|
---|
[31784] | 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 | }
|
---|
[31393] | 37 | }
|
---|
[32285] | 38 |
|
---|
[31393] | 39 | dependencies {
|
---|
[32689] | 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')
|
---|
[31784] | 48 | // For plugins it's irrelevant, which version is specified, always the latest version is used.
|
---|
[32693] | 49 | requiredPlugin (name: 'apache-commons'){changing=true}
|
---|
| 50 | requiredPlugin (name: 'apache-http'){changing=true}
|
---|
[31393] | 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'
|
---|
[32631] | 65 | include 'LICENSE*'
|
---|
[31393] | 66 | }
|
---|
| 67 | }
|
---|
| 68 | test {
|
---|
| 69 | java {
|
---|
| 70 | srcDirs = ['test/unit']
|
---|
| 71 | }
|
---|
| 72 | resources{
|
---|
| 73 | srcDirs = ['test/data']
|
---|
| 74 | }
|
---|
| 75 | }
|
---|
| 76 | }
|
---|
| 77 |
|
---|
[31798] | 78 | eclipse {
|
---|
| 79 | project {
|
---|
| 80 | name = 'JOSM-Mapillary'
|
---|
[32063] | 81 | comment = property('plugin.description')
|
---|
[32340] | 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'
|
---|
[32063] | 84 | buildCommand 'ch.acanda.eclipse.pmd.builder.PMDBuilder'
|
---|
[32340] | 85 | buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
|
---|
[31798] | 86 | }
|
---|
| 87 | }
|
---|
[32063] | 88 | eclipseClasspath.dependsOn cleanEclipseClasspath
|
---|
| 89 | eclipseProject.dependsOn cleanEclipseProject
|
---|
| 90 | tasks.eclipse.dependsOn = ['eclipseClasspath', 'eclipseProject']
|
---|
[31798] | 91 |
|
---|
[31818] | 92 | tasks.withType(Javadoc) {
|
---|
| 93 | failOnError false
|
---|
| 94 | }
|
---|
| 95 |
|
---|
[31393] | 96 | test {
|
---|
| 97 | testLogging {
|
---|
| 98 | exceptionFormat "full"
|
---|
| 99 | events "started", "passed", "skipped", "failed", "standardOut", "standardError"
|
---|
| 100 | }
|
---|
| 101 | }
|
---|