File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
buildSrc/src/main/kotlin/dev/isxander/controlify Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -144,20 +144,23 @@ tasks.named<ProcessResources>("generateModMetadata") {
144144 }
145145}
146146
147+ val publishUsername = providers
148+ .gradleProperty(" XANDER_MAVEN_USER" )
149+ .orElse(providers.environmentVariable(" XANDER_MAVEN_USER" ))
150+
151+ val publishPassword = providers
152+ .gradleProperty(" XANDER_MAVEN_PASS" )
153+ .orElse(providers.environmentVariable(" XANDER_MAVEN_PASS" ))
154+
155+
147156publishing {
148157 repositories {
149- val username = prop(" XANDER_MAVEN_USER" )
150- val password = prop(" XANDER_MAVEN_PASS" )
151- if (username != null && password != null ) {
152- maven(url = " https://maven.isxander.dev/releases" ) {
153- name = " XanderReleases"
154- credentials {
155- this .username = username
156- this .password = password
157- }
158+ maven(url = " https://maven.isxander.dev/releases" ) {
159+ name = " XanderReleases"
160+ credentials(PasswordCredentials ::class ) {
161+ username = publishUsername.orNull
162+ password = publishPassword.orNull
158163 }
159- } else {
160- logger.warn(" Xander Maven credentials not satisfied." )
161164 }
162165 }
163166}
You can’t perform that action at this time.
0 commit comments