forked from mzmine/mzmine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
40 lines (36 loc) · 1.17 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
plugins {
`maven-publish`
}
// list of sub projects that create a java library
val publishingSubProjects = listOf(
"convention-plugins",
"java-convention",
"javafx-framework",
"mzmine-community",
"taskcontroller",
"utils"
)
subprojects {
// this variable is set by running .\gradlew publish with the command line argument -Pmziorepo=true
val pushOnline: Boolean = project.findProperty("mziorepo")?.toString()?.toBoolean() ?: false
if(name in publishingSubProjects) {
apply(plugin = "maven-publish")
publishing {
repositories {
if (pushOnline) {
maven {
url = uri("https://maven.pkg.github.com/mzio-gmbh/mzio_mzmine")
credentials {
username = System.getenv("PUBLISH_PACKAGE_USERNAME")
password = System.getenv("PUBLISH_PACKAGE_TOKEN")
}
}
} else {
maven {
url = uri(layout.projectDirectory.dir("../local-repo/"))
}
}
}
}
}
}