-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
103 lines (92 loc) · 2.67 KB
/
Copy pathbuild.gradle
File metadata and controls
103 lines (92 loc) · 2.67 KB
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 'signing'
id 'maven-publish'
}
version = '0.8.0-SNAPSHOT'
group = 'io.github.m2ci-msp'
description = 'Java TextGridTools'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation libs.commons.lang3
implementation libs.json
testImplementation libs.testng
testImplementation libs.commons.io
}
test {
useTestNG()
testLogging {
exceptionFormat = 'full'
}
}
/**********************************************************************************************
** Formatting part
**********************************************************************************************/
task autoFormatCode {
def config = file("astyle.conf")
inputs.files config
outputs.upToDateWhen { false }
doLast {
fileTree(dir: '.', include: '**/*.java').each { java_file ->
exec {
commandLine "astyle", "--options=$config", java_file
}
}
}
}
/**********************************************************************************************
** Project meta + publishing part
**********************************************************************************************/
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.name
description = project.description
url = 'https://github.com/m2ci-msp/jtgt'
licenses {
license {
name = 'GNU Lesser General Public License v3.0 only'
url = 'https://spdx.org/licenses/LGPL-3.0-only.html'
}
}
developers {
developer {
id = 'seblemaguer'
name = 'Sébastien Le Maguer'
}
developer {
id = 'psibre'
name = 'Ingmar Steiner'
}
}
scm {
connection = 'scm:git:git://github.com/m2ci-msp/jtgt.git'
developerConnection = 'scm:git:ssh://git@github.com:m2ci-msp/jtgt.git'
url = 'https://github.com/m2ci-msp/jtgt'
}
}
}
}
repositories {
maven {
url = layout.buildDirectory.dir('repo')
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.withType(Sign).configureEach {
onlyIf { !version.endsWith("SNAPSHOT") }
}