forked from marc1s/emotionml-checker-java
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
101 lines (91 loc) · 2.55 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
plugins {
id 'java-library'
id 'application'
id 'maven-publish'
id 'signing'
}
group 'de.dfki.mary'
version '1.3-SNAPSHOT'
description 'A generic implementation of EmotionML checks, in Java'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testCompileOnly 'junit:junit:4.13.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
withSourcesJar()
withJavadocJar()
}
test {
useJUnitPlatform()
}
application {
mainClass = 'emotionml.Main'
}
jar {
manifest {
attributes('Main-Class': application.mainClass)
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.name
description = project.description
def projectUrl = 'https://github.com/marytts/emotionml-checker-java'
url = projectUrl
licenses {
license {
name = 'Creative Commons Zero v1.0 Universal'
url = 'https://creativecommons.org/publicdomain/zero/1.0/'
}
}
developers {
developer {
id = 'marc1s'
name = 'Marc Schröder'
}
developer {
id = 'psibre'
name = 'Ingmar Steiner'
}
}
scm {
connection = "scm:git:${projectUrl}.git"
developerConnection = 'scm:git:ssh://github.com:marytts/emotionml-checker-java.git'
url = "$projectUrl/tree/master"
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/$System.env.GITHUB_REPOSITORY"
credentials {
username = System.env.GITHUB_ACTOR
password = System.env.GITHUB_TOKEN
}
}
if (isReleaseVersion) {
maven {
name = 'OSSRH'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials(PasswordCredentials)
}
}
}
}
signing {
required { isReleaseVersion }
sign publishing.publications.mavenJava
}