source: osm/applications/editors/josm/plugins/mapillary/gradle/manifest.gradle@ 32954

Last change on this file since 32954 was 32693, checked in by floscher, 9 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: 1.4 KB
Line 
1import org.gradle.process.internal.ExecException;
2apply from: 'gradle/version-functions.gradle'
3
4// Required attributes
5def manifestAtts = [
6 "Created-By": System.getProperty("java.version") + " (" + System.getProperty("java.vendor") + ")",
7 "Gradle-Version": getGradle().getGradleVersion(),
8 "Plugin-Class": property('plugin.class'),
9 "Plugin-Date": String.format("%1\$tY-%1\$tm-%1\$tdT%1\$tH:%1\$tM:%1\$tS%1\$tz", new GregorianCalendar()),
10 "Plugin-Description": property('plugin.description'),
11 "Plugin-Mainversion": property('plugin.main.version'),
12 "Plugin-Version": property('plugin.svnrevision')
13]
14
15try {
16 manifestAtts["Plugin-SemVersion"] = getVersionName()
17} catch (ExecException e) {
18 System.out.println("This is probably not a git-repository. So the semantic version number is not available.")
19}
20
21// Optional attributes
22if (hasProperty('plugin.author')) {
23 manifestAtts["Author"] = property('plugin.author')
24}
25if (hasProperty('plugin.canloadatruntime')) {
26 manifestAtts["Plugin-Canloadatruntime"] = property('plugin.canloadatruntime')
27}
28if (hasProperty('plugin.icon')) {
29 manifestAtts["Plugin-Icon"] = property('plugin.icon')
30}
31if (hasProperty('plugin.link')) {
32 manifestAtts["Plugin-Link"] = property('plugin.link')
33}
34if (hasProperty('plugin.requires')) {
35 manifestAtts["Plugin-Requires"] = property('plugin.requires')
36}
37
38jar.manifest.attributes manifestAtts
Note: See TracBrowser for help on using the repository browser.