-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
68 lines (61 loc) · 2.55 KB
/
Copy pathsettings.gradle.kts
File metadata and controls
68 lines (61 loc) · 2.55 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
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
// Maven Central publishing via Sonatype Central Portal. The aggregation plugin is auto-applied
// to subprojects with `maven-publish` — `./gradlew publishAggregationToCentralPortal` uploads
// every signed publication to the Central Portal in a single bundle.
id("com.gradleup.nmcp.settings") version "1.6.1"
}
rootProject.name = "pk-auth"
includeBuild("build-logic")
// Central Portal credentials. Set CENTRAL_PORTAL_USERNAME / CENTRAL_PORTAL_PASSWORD (a user token)
// in CI; locally these resolve from `~/.gradle/gradle.properties` (centralPortalUsername /
// centralPortalPassword) if present, so a fresh clone doesn't crash without env vars.
nmcpSettings {
centralPortal {
username = System.getenv("CENTRAL_PORTAL_USERNAME")
?: providers.gradleProperty("centralPortalUsername").orNull
password = System.getenv("CENTRAL_PORTAL_PASSWORD")
?: providers.gradleProperty("centralPortalPassword").orNull
}
}
// Resolve project version from an exact Git tag (vX.Y.Z[-suffix]) so a tagged build produces the
// release version without editing gradle.properties. Local builds and untagged HEADs fall through
// to the SNAPSHOT version pinned in gradle.properties.
gradle.beforeProject {
val gitVersion = providers.exec {
commandLine("git", "describe", "--tags", "--exact-match", "HEAD")
isIgnoreExitValue = true
}.standardOutput.asText.get().trim()
if (gitVersion.startsWith("v")) {
val match = Regex("^v(\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.]+)?)$").matchEntire(gitVersion)
if (match != null) {
version = match.groupValues[1]
logger.lifecycle("Using version from Git tag: $version")
} else {
logger.warn("Git tag '$gitVersion' does not match semantic versioning format (vX.Y.Z)")
}
}
}
// Subprojects are added phase by phase (see pk-auth-build-brief.md §10).
include("pk-auth-core")
include("pk-auth-jwt")
include("pk-auth-backup-codes")
include("pk-auth-magic-link")
include("pk-auth-otp")
include("pk-auth-refresh-tokens")
include("pk-auth-admin-api")
include("pk-auth-persistence-jdbi")
include("pk-auth-persistence-dynamodb")
include("pk-auth-testkit")
include("pk-auth-spring-boot-starter")
include("pk-auth-dropwizard")
include("pk-auth-micronaut")
include("examples:spring-boot-demo")
include("examples:dropwizard-demo")
include("examples:micronaut-demo")