-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (63 loc) · 1.82 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
plugins {
id "java"
id "org.openstreetmap.josm" version "0.8.2"
id "maven-publish"
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/gabortim/josm-libphonenumber"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
compileJava {
// https://docs.gradle.org/current/userguide/building_java_projects.html#sec:compiling_with_release
options.release = 17
}
version = "8.13.53"
String versionFile = "version.txt"
josm {
pluginName = "libphonenumber"
josmCompileVersion = "18622"
manifest {
author = "gaben"
description = "Provides Google libphonenumber library components. Not meant to be installed directly by users, but rather as a dependency for other plugins."
minJosmVersion = "17428"
minJavaVersion = 17
canLoadAtRuntime = true
mainClass = "org.openstreetmap.josm.plugins.libphonenumber.LibphonenumberPlugin"
website = new URI("https://github.com/gabortim/josm-libphonenumber").toURL()
}
}
dependencies {
// https://mvnrepository.com/artifact/com.googlecode.libphonenumber/libphonenumber
packIntoJar("com.googlecode.libphonenumber:libphonenumber:$version")
// https://mvnrepository.com/artifact/com.googlecode.libphonenumber/geocoder
packIntoJar("com.googlecode.libphonenumber:geocoder:2.247")
}
jar {
from("LICENSE")
from("README.md")
}
tasks.register("storeVersion") {
doLast {
new File(versionFile).text = "$version"
}
}
tasks.jar.dependsOn("storeVersion")
tasks.clean {
delete(versionFile)
}