-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
51 lines (42 loc) · 1.78 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
41
42
43
44
45
46
47
48
49
50
51
import pl.allegro.tech.build.axion.release.domain.VersionConfig
plugins {
id("pl.allegro.tech.build.axion-release")
id("io.github.gradle-nexus.publish-plugin")
}
configure<VersionConfig> {
checks.setAheadOfRemote(false)
checks.isSnapshotDependencies = false
hooks.pre("fileUpdate", mutableMapOf(
"files" to listOf("server/src/docs/antora/antora.yml"),
"pattern" to KotlinClosure2<String, pl.allegro.tech.build.axion.release.domain.hooks.HookContext, String>({ v, _ -> "version: '.*'" }),
"replacement" to KotlinClosure2<String, pl.allegro.tech.build.axion.release.domain.hooks.HookContext, String>({ v, _ -> "version: '$v'" })
))
hooks.pre("fileUpdate", mutableMapOf(
"files" to listOf("docs-site/package.json", "server-ui/package.json"),
"pattern" to KotlinClosure2<String, pl.allegro.tech.build.axion.release.domain.hooks.HookContext, String>({ v, _ -> "\"version\": \".*\"" }),
"replacement" to KotlinClosure2<String, pl.allegro.tech.build.axion.release.domain.hooks.HookContext, String>({ v, _ -> "\"version\": \"$v\"" })
))
hooks.pre("commit")
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
val rootVersion = scmVersion.version
allprojects {
project.group = "io.wttech.habit"
project.version = rootVersion
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
}
tasks.register("publishToMavenCentral") {
dependsOn(":client:publishToSonatype",
":junit-plugin:publishToSonatype")
}