-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (58 loc) · 1.85 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
allprojects {
apply plugin: 'java'
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
apply plugin: 'idea'
apply plugin: 'maven'
group = project.property('group')
version = project.property('version')
def user = hasProperty('mavenUser') ? mavenUser : System.getenv('mavenUser')
def pass = hasProperty('mavenPassword') ? mavenPassword : System.getenv('mavenPassword')
repositories {
mavenCentral()
maven{
name "Sonatype Public"
url "http://oss.sonatype.org/content/groups/public/"
}
}
dependencies {
compile (group: 'org.apache.commons', name: 'commons-lang3', version: 3.5)
compile (group: 'commons-codec', name: 'commons-codec', version: 1.10)
compile (group: 'org.yaml', name: 'snakeyaml', version: 1.17)
testCompile (group: 'junit', name: 'junit', version: 4.12)
}
jar {
manifest {
attributes 'Implementation-Version': version,
'Main-Class': 'com.drewhoener.Fido'
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
//noinspection GroovyAssignabilityCheck
archives sourcesJar
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://drewhoener.com/repo/repository/plugin-releases/") {
authentication(userName: "$user", password: "$pass")
}
snapshotRepository(url: "https://drewhoener.com/repo/repository/plugin-snapshots/") {
authentication(userName: "$user", password: "$pass")
}
pom.project {
pom.version = project.version
pom.artifactId = project.name
pom.groupId = project.group
}
}
}
}