-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.gradle
More file actions
32 lines (28 loc) · 1.13 KB
/
Copy pathsettings.gradle
File metadata and controls
32 lines (28 loc) · 1.13 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
pluginManagement {
includeBuild('build-logic')
}
plugins {
id 'com.gradleup.nmcp.settings' version '1.6.2'
}
def centralUsername = providers.gradleProperty('mavenCentralUsername')
def centralPassword = providers.gradleProperty('mavenCentralPassword')
// Gradle 9.6.1 cannot isolate providers.environmentVariable() when NMCP carries
// settings configuration into projects, so read only the environment fallback eagerly.
def centralUsernameFromEnvironment = System.getenv('MAVEN_CENTRAL_USERNAME')
def centralPasswordFromEnvironment = System.getenv('MAVEN_CENTRAL_PASSWORD')
if (centralUsernameFromEnvironment != null) {
centralUsername = centralUsername.orElse(centralUsernameFromEnvironment)
}
if (centralPasswordFromEnvironment != null) {
centralPassword = centralPassword.orElse(centralPasswordFromEnvironment)
}
def projectVersion = providers.gradleProperty('version').get()
nmcpSettings {
centralPortal {
username.set(centralUsername)
password.set(centralPassword)
publishingType = 'AUTOMATIC'
publicationName = "markets.alpaca:alpaca-java:${projectVersion}"
}
}
rootProject.name = 'alpaca-java'