-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
48 lines (41 loc) · 1.21 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
plugins {
id 'eclipse'
}
def env = System.getenv()
subprojects {
apply plugin: 'java-library'
if (project.noPublish == 'false') apply plugin: 'maven-publish'
java {
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
if (project.noPublish == 'false') {
publishing {
publications {
mavenJava(MavenPublication) {
groupId = project.group
artifactId = "nahara-${project.name}"
version = project.version
from components.java
}
}
repositories {
mavenLocal()
if (env.mavenUrl) {
println "Maven Publish: Found Maven URL from envvar"
maven {
url env.mavenUrl
if (env.mavenUsername) {
credentials {
username env.mavenUsername
password env.mavenPassword
}
}
}
}
}
}
}
}