-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
113 lines (90 loc) · 3.36 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
ext {
projectVersion = project.hasProperty('release') ? "${baseVersion}-RELEASE" : "${baseVersion}-SNAPSHOT"
}
description = "Kerberos authentication $projectVersion"
defaultTasks "clean", "build"
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
allprojects {
apply from: rootProject.file("gradle/dependencies.gradle")
group "$baseGroup"
version "$projectVersion"
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/public' }
mavenCentral()
}
if ("${project.name}".endsWith("autoconfigure") || "${project.name}".endsWith("api")) {
apply plugin: 'java'
apply plugin: 'maven-publish'
jar {
manifest {
attributes(
"Manifest-Version": "1.0",
"Implementation-Title": project.name,
"Implementation-Version": project.version
)
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
maven(MavenPublication) {
groupId "$project.group"
artifactId "$project.name"
version "$project.version"
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = "${project.name}"
description = 'A kerberos authentication based on JAAS for spring autoconfigure.'
url = 'https://github.com/lawyerance/kerberos-authentication'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'lawyerance'
name = 'lawyerance'
email = 'lawyerance@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/lawyerance/kerberos-authentication.git'
developerConnection = 'scm:git:ssh://github.com/lawyerance/kerberos-authentication.git'
url = 'https://github.com/lawyerance/kerberos-authentication'
}
}
}
}
repositories {
mavenLocal()
maven {
def releasesRepoUrl = "$buildDir/repos/releases"
def snapshotsRepoUrl = "$buildDir/repos/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
}
}