Changeset 31784 in osm for applications/editors/josm
- Timestamp:
- 2015-12-01T23:08:33+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/build.gradle
r31783 r31784 7 7 sourceCompatibility = '1.7' 8 8 9 configurations {10 packIntoJar11 compile.extendsFrom packIntoJar12 }13 9 repositories { 14 10 // for JUnit 15 11 mavenCentral() 16 // for commons-imaging17 maven {18 url "https://repository.apache.org/content/repositories/snapshots/"19 }20 12 //for josm-(latest|tested).jar 21 13 ivy { 22 url "https://josm.openstreetmap.de/download/" 14 url 'https://josm.openstreetmap.de/download' 15 layout 'pattern', { 16 artifact "[artifact]-[revision].jar" 17 artifact "[artifact]-snapshot-[revision].jar" 18 artifact "Archiv/[artifact]-snapshot-[revision].jar" 19 } 20 } 21 //for josm-plugins 22 ivy { 23 url "https://svn.openstreetmap.org/applications/editors/josm/dist/" 23 24 layout "pattern", { 24 artifact "[artifact] -[revision].jar"25 artifact "[artifact].jar" 25 26 } 26 27 } 27 28 } 28 29 dependencies { 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:latest' 32 compile 'org.apache.commons:commons-imaging:1.0-SNAPSHOT' 33 34 packIntoJar 'com.amazonaws:aws-java-sdk-s3:1.10.37' 35 packIntoJar 'org.apache.httpcomponents:httpmime:4.5.1' 30 // The JOSM-version can be specified as "latest", "tested" or the numeric version number. 31 compile ':josm:latest' 32 // For plugins it's irrelevant, which version is specified, always the latest version is used. 33 compile ':apache-commons:latest' 34 compile ':apache-http:latest' 36 35 37 36 testCompile 'junit:junit:4.12' … … 63 62 build.dependsOn jacocoTestReport 64 63 build.dependsOn projectReport 65 66 /** Eclipse configuration */67 eclipse {68 classpath {69 downloadSources=true70 downloadJavadoc=true71 }72 }73 64 74 65 /** FindBugs configuration */ … … 105 96 106 97 jar { 107 from configurations.packIntoJar.collect { it.isDirectory() ? it : zipTree(it) }108 98 manifest { 109 99 attributes("Plugin-Mainversion": project.property('plugin.main.version'), 110 "Plugin-Version": "31 395",100 "Plugin-Version": "31784", 111 101 "Plugin-Class": project.property('plugin.class'), 112 102 "Plugin-Description": project.property('plugin.description'), … … 120 110 } 121 111 112 task activatePlugin(type: Copy) { 113 from "gradle/josm-preferences.xml" 114 into "$buildDir/.josm" 115 rename 'josm-preferences.xml', 'preferences.xml' 116 } 117 118 task installPlugin(type: Copy) { 119 from "$buildDir/libs/${project.name}.jar" 120 from configurations.runtime 121 into "$buildDir/.josm/plugins" 122 include 'apache*.jar' 123 include "${project.name}.jar" 124 rename "${project.name}.jar", 'Mapillary.jar' 125 rename 'apache-(.*)-.*.jar', 'apache-$1.jar' 126 } 127 installPlugin.dependsOn jar 128 installPlugin.dependsOn activatePlugin 129 122 130 /** 123 * The following are tasks to directly run JOSM with the freshly-built 124 * Mapillary-plugin already installed. 125 * Only prerequisite is to have JOSM (or JOSM-latest) installed on your machine. 126 * Previously installed versions of the plugin are overridden by executions of these tasks. 127 **/ 128 129 task installPluginToJosm(type: Copy) { 130 from "$buildDir/libs/josm-mapillary-plugin.jar" 131 into "$System.env.HOME/.josm/plugins" 132 rename '.*', 'Mapillary.jar' 131 * This runs the JOSM-version specified in the dependency configuration above. 132 * The home-directory of this JOSM is located in $buildDir/.josm, so it doesn't interfere with any other JOSM-installations. 133 */ 134 task runJosm(type: JavaExec) { 135 classpath = sourceSets.main.runtimeClasspath 136 main = 'JOSM' 137 args '--offline=josm_website' 138 jvmArgs "-Djosm.home=$buildDir/.josm" 133 139 } 134 installPluginToJosm.dependsOn jar 135 136 task runJosm(type: Exec) { 137 commandLine 'josm' 138 } 139 runJosm.dependsOn installPluginToJosm 140 141 task installPluginToJosmLatest(type: Copy) { 142 from "$buildDir/libs/josm-mapillary-plugin.jar" 143 into "$System.env.HOME/.josm-latest/plugins" 144 rename '.*', 'Mapillary.jar' 145 } 146 installPluginToJosmLatest.dependsOn jar 147 148 task runJosmLatest(type: Exec) { 149 commandLine 'josm-latest' 150 } 151 runJosmLatest.dependsOn installPluginToJosmLatest 140 runJosm.dependsOn installPlugin
Note:
See TracChangeset
for help on using the changeset viewer.