File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,9 @@ inline fun Project.setupPublishing(
9292 setUrl(" https://oss.sonatype.org/service/local/staging/deploy/maven2" )
9393
9494 credentials {
95- username = System .getenv(" SONATYPE_USER" )
96- password = System .getenv(" SONATYPE_KEY" )
95+ username = System .getenv(" SONATYPE_USER" ) ? : rootProject.properties[" sonatype.user" ]?.toString()
96+ password =
97+ System .getenv(" SONATYPE_KEY" ) ? : rootProject.properties[" sonatype.password" ]?.toString()
9798 }
9899 }
99100 }
Original file line number Diff line number Diff line change 88 targets {
99 def hostOs = System . getProperty(" os.name" )
1010
11- def linuxEnabled = hostOs == " Mac OS X "
12- def macosEnabled = hostOs == " Linux "
11+ def linuxEnabled = hostOs == " Linux "
12+ def macosEnabled = hostOs. startsWith( " Mac " )
1313 def winEnabled = hostOs. startsWith(" Windows" )
1414
1515 project. ext. isLinuxHost = linuxEnabled
Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ publishing {
159159 url = " https://oss.sonatype.org/service/local/staging/deploy/maven2"
160160
161161 credentials {
162- username = System . getenv(" SONATYPE_USER" )
163- password = System . getenv(" SONATYPE_KEY" )
162+ username = System . getenv(" SONATYPE_USER" ) ?: rootProject . properties . get( " sonatype.user " ) ?. toString()
163+ password = System . getenv(" SONATYPE_KEY" ) ?: rootProject . properties . get( " sonatype.password " ) ?. toString()
164164 }
165165 }
166166 }
You can’t perform that action at this time.
0 commit comments