-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
113 lines (101 loc) · 3.3 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
repositories {
flatDir name: 'libs', dirs: 'libs'
jcenter()
}
dependencies {
compile 'org:hid4java:0.5.0-modified'
compile 'net.java.dev.jna:jna:4.2.2'
}
version = '0.1.0'
group = 'uk.co.cloudhunter'
configurations { allJars }
artifacts{
allJars file("libs/hid4java-0.5.0-modified.jar")
}
task createPom << {
pom {
project {
groupId 'uk.co.cloudhunter'
artifactId 'streamdeckjava'
version '0.1.0'
inceptionYear '2017'
licenses {
license {
name 'MIT License'
url 'http://www.opensource.org/licenses/mit-license.php'
distribution 'repo'
}
}
repositories {
repository {
id 'central'
name 'Maven Repository Switchboard'
url 'http://repo1.maven.org/maven2'
}
repository {
id 'k-4u'
name 'k-4u Maven'
url 'http://maven.k-4u.nl/'
}
}
}
}.writeTo("pom.xml")
}
task("uploadJars", dependsOn:"createPom") {
description = "uploads JARs"
if (System.getenv("local_maven") != null) {
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://" + System.getenv("local_maven"))
pom {
project {
groupId 'uk.co.cloudhunter'
artifactId 'streamdeckjava'
version '0.1.0'
inceptionYear '2017'
licenses {
license {
name 'MIT License'
url 'http://www.opensource.org/licenses/mit-license.php'
distribution 'repo'
}
}
repositories {
repository {
id 'central'
name 'Maven Repository Switchboard'
url 'http://repo1.maven.org/maven2'
}
repository {
id 'k-4u'
name 'k-4u Maven'
url 'http://maven.k-4u.nl/'
}
}
}
}
}
}
}
}
}
uploadAllJars {
if (System.getenv("local_maven") != null) {
repositories {
mavenDeployer {
repository(url: "file://" + System.getenv("local_maven"))
pom.artifactId = "hid4java"
pom.version = "0.5.0-modified"
pom.groupId = "org"
pom.whenConfigured {pom ->
pom.dependencies.removeAll { dep -> dep.groupId == "org" && dep.artifactId == "hid4java" }
}
}
}
}
}