-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (64 loc) · 1.96 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
apply plugin: 'maven'
// apply plugin: 'maven-publish'
apply plugin: 'java'
apply plugin: 'war'
group 'org.example'
version '1.0-SNAPSHOT'
//jar.enabled = true
//jar.classifier = 'classes'
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.commons:commons-lang3:3.12.0'
compile 'org.apache.commons:commons-io:1.3.2'
providedCompile 'org.apache.commons:commons-crypto:1.1.0'
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task classesJar(type: Jar) {
from sourceSets.main.output
classifier = 'classes'
}
/*
publishing {
repositories {
maven {
def releasesRepoUrl = "https://artifactory.katabatcloud.com/artifactory/libs-release-local"
def snapshotsRepoUrl = "https://artifactory.katabatcloud.com/artifactory/libs-snapshot-local"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username "${artifactory_user}"
password "${artifactory_password}"
}
}
}
publications {
mavenWar(MavenPublication) {
from components.java
pom.packaging = "war"
artifact war
artifact sourceJar
}
}
}*/
artifacts {
archives sourcesJar
archives classesJar
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://artifactory.katabatcloud.com/artifactory/libs-release-local") {
authentication(userName: "${artifactory_user}", password: "${artifactory_password}")
}
snapshotRepository(url: "https://artifactory.katabatcloud.com/artifactory/libs-snapshot-local") {
authentication(userName: "${artifactory_user}", password: "${artifactory_password}")
}
}
}
}