forked from imcdonagh/image4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (94 loc) · 2.28 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
sourceCompatibility = 8
targetCompatibility = 8
version = '0.7.2.2'
group = 'com.github.imcdonagh'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.12'
}
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyy-MM-dd HH:mm')
return formattedDate
}
java {
withJavadocJar()
withSourcesJar()
}
jar {
manifest {
attributes "Build-Date": getDate()
attributes "Implementation-Version": version
}
}
tasks.withType(JavaCompile) { options.encoding = "UTF-8" }
tasks.withType(Javadoc).all { enabled = false }
sourceSets {
main {
java {
srcDirs = ['src']
include '**/*.java'
}
resources {
srcDirs = ['src']
exclude '**/*.java'
}
}
test {
java {
srcDirs = ['test']
include '**/*.java'
}
resources {
srcDirs = ['test']
exclude '**/*.java'
}
}
}
publishing {
repositories {
maven {
name = "PrivateRepo"
url = "${nexusRepo}"
credentials {
username = "${nexusUser}"
password = "${nexusPassword}"
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Schmidor/image4j")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
maven(MavenPublication) {
artifactId = 'image4j'
from components.java
pom {
name = 'image4J'
description ='The image4j library allows you to read and write certain image formats in 100% pure Java.'
url = 'https://github.com/Schmidor/image4j'
licenses {
license {
name = 'GNU Lesser General Public License, version 2.1'
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html'
}
}
scm {
connection = 'git@github.com:Schmidor/image4j.git'
developerConnection = 'git@github.com:Schmidor/image4j.git'
url = 'https://github.com/Schmidor/image4j'
}
}
}
}
}