-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
69 lines (59 loc) · 1.33 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
def PUBLISH_PROJECTS = [
'flak-api',
'flak-spi',
'flak-backend-jdk',
'flak-jackson',
'flak-login',
'flak-resource',
'flak-swagger',
'flak-util'
]
allprojects {
apply plugin: 'java'
apply plugin: 'ivy-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testImplementation "junit:junit:4.11"
}
if (PUBLISH_PROJECTS.contains(project.name)) {
apply plugin: 'java-library'
apply plugin: "ivy-publish"
apply plugin: "maven-publish"
publishing {
repositories {
ivy {
name "local"
url "${System.properties['user.home']}/.ivy2/local"
}
}
publications {
// allows to do a local publish
ivy(IvyPublication) {
organisation "com.github.pcdv.flak"
from components.java
}
// publishToMavenLocal (or jitpack.io) using -Pversion=x.y.z
maven(MavenPublication) {
groupId = 'com.github.pcdv.flak'
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
jar {
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version
}
}
}