-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
104 lines (85 loc) · 2.05 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
plugins {
id 'java-library'
id "org.ajoberstar.grgit" version "3.1.1"
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_1_8
ext {
buildDate = new Date()
name = 'ding3d'
versionMajor = 1
versionMinor = 5
buildNumber = 5
}
repositories {
jcenter()
}
dependencies {
}
def artifactVersion
def tagName
task initVariables {
artifactVersion = project.versionMajor + '.' + project.versionMinor + "." + project.buildNumber
}
group = 'javax.media'
version = artifactVersion
task processLicense(type: Copy) {
from('COPYRIGHT.TXT') {
filteringCharset = 'UTF-8'
}
from('LICENSE-UTILS.TXT') {
filteringCharset = 'UTF-8'
}
from('LICENSE.TXT') {
filteringCharset = 'UTF-8'
}
from('README-FIRST.TXT') {
filteringCharset = 'UTF-8'
}
from('THIRDPARTY-LICENSE-DISTANCE.TXT') {
filteringCharset = 'UTF-8'
}
from('THIRDPARTY-LICENSE-FIST.TXT') {
filteringCharset = 'UTF-8'
}
from('THIRDPARTY-LICENSE-MAINFRAME.TXT') {
filteringCharset = 'UTF-8'
}
into "$buildDir/tmp/license"
}
jar {
manifest {
doFirst {
println 'Creating ' + jar.archiveName + ' file.'
}
def userName = System.properties['user.name']
attributes(
'Built-Id': userName + '-' + project.name + '-' + artifactVersion,
'Built-Date': project.buildDate.format('yyyy-MM-dd HH:mm:ss'),
'Implementation-Title': project.name,
'Implementation-Version': artifactVersion
)
}
into('META-INF') {
from processLicense
}
}
publishing {
publications {
library(MavenPublication) {
groupId group
artifactId project.name
version project.versionMajor + '.' + project.versionMinor + "." + buildNumber
from components.java
}
}
repositories {
maven {
credentials {
username mavenUser
password mavenPassword
}
url = "http://artifactory/artifactory/libs-release-local"
}
}
}