-
-
Notifications
You must be signed in to change notification settings - Fork 96
/
build.gradle
130 lines (110 loc) · 3.6 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.hibernate.build:gradle-maven-publish-auth:3.0.4"
}
}
plugins {
id "net.researchgate.release" version "3.0.2"
id "com.adarshr.test-logger" version "4.0.0"
}
subprojects {
group = "org.recast4j"
repositories {
mavenLocal()
mavenCentral()
}
apply plugin: "java"
apply plugin: "maven-publish"
apply plugin: "signing"
apply plugin: "com.adarshr.test-logger"
if (!project.hasProperty("ci")) {
apply plugin: "org.hibernate.build.maven-repo-auth"
}
dependencies {
testImplementation (libs.junit5.api)
testImplementation (libs.junit5.params)
testImplementation (libs.assertj.core)
testImplementation (libs.mockito)
testRuntimeOnly (libs.junit5.engine)
}
java {
if (!project.hasProperty("ci")) {
withSourcesJar()
withJavadocJar()
}
}
compileJava {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
options.release = 11
}
}
javadoc {
options.encoding = "UTF-8"
options.addBooleanOption("Xdoclint:none", true)
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption("html5", true)
}
}
test {
useJUnitPlatform()
}
jar {
manifest { attributes("Implementation-Version": archiveVersion) }
}
if (it.name != "recast-demo") {
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = "Recast and Detour for Java"
description = "Navigation Mesh Construction and Path-finding Toolkit."
url = "http://recast4j.org"
licenses {
license {
name = "Zlib License"
url = "https://github.com/ppiastucki/recast4j/blob/master/License.txt"
}
}
developers {
developer {
name = "Piotr Piastucki"
email = "piotr@recast4j.org"
}
}
scm {
connection = "scm:git:https://github.com/ppiastucki/recast4j.git"
developerConnection = "scm:git:ssh://git@github.com:ppiastucki/recast4j.git"
url = "https://github.com/ppiastucki/recast4j"
}
}
}
}
repositories {
maven {
name = "ossrh"
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
signing {
sign publishing.publications.mavenJava
}
}
}
// https://github.com/researchgate/gradle-release/issues/144
//task build() {
// dependsOn subprojects.build
//}
task publish() {
dependsOn subprojects.publish
}
afterReleaseBuild.dependsOn publish