-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
96 lines (90 loc) · 2.66 KB
/
build.gradle.kts
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
plugins {
id("java")
id("maven-publish")
id("signing")
jacoco
}
repositories {
mavenCentral()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
}
tasks.withType(Jar::class) {
manifest {
attributes["Manifest-Version"] = "1.0"
attributes["Main-Class"] = "io.github.seujorgenochurras.demo.ImageToAscii"
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "io.github.seujorgenochurras"
artifactId = "image-to-ascii"
version = "0.0.5"
from(components["java"])
pom {
name.set("Image to ASCII")
description.set("A java Image to ASCII parser with many configurable features")
url.set("https://github.com/seujorgenochurras/image-to-ascii")
licenses {
license {
name.set("MIT License")
url.set("http://www.opensource.org/licenses/mit-license.php")
}
}
developers {
developer {
id.set("LILJ")
name.set("Little Jhey")
email.set("jjotinha_oficial@outlook.com")
}
}
scm {
connection.set("scm:git:git://github.com/image-to-ascii")
developerConnection.set("scm:git:git://github.com/image-to-ascii")
url.set("https://github.com/seujorgenochurras/image-to-ascii")
}
}
}
}
repositories {
maven {
name = "OSSRH"
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.properties["repoUser"].toString()
password = project.properties["repoPassword"].toString()
}
}
}
}
java {
withJavadocJar()
withSourcesJar()
}
signing {
useGpgCmd()
val secretKey = project.properties["secretSigningKey"].toString()
val secretKeyPassword = project.properties["secretSigningKeyPassword"].toString()
useInMemoryPgpKeys(secretKey, secretKeyPassword)
sign(publishing.publications)
}
tasks.getByName<Test>("test") {
useJUnitPlatform()
}
tasks.publish{
dependsOn(tasks.test)
}
jacoco{
toolVersion = "0.8.11"
reportsDirectory.set(layout.buildDirectory.dir("jacoco"))
}