-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We cannot justify use of build.gradle.kts. As usual, Gradle user experience is left horrible and you cannot simply include another gradle script in .kts.
- Loading branch information
1 parent
2991c25
commit aaa3353
Showing
4 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
tasks.register('javadocJar', Jar) { | ||
archiveClassifier.set('javadoc') | ||
from javadoc.destinationDir | ||
} | ||
tasks.register('sourceJar', Jar) { | ||
archiveClassifier.set('sources') | ||
from sourceSets.main.allSource | ||
duplicatesStrategy(DuplicatesStrategy.EXCLUDE) | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
artifact(javadocJar) | ||
artifact(sourceJar) | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "OSSRH" | ||
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// It is modified version of https://github.com/GetStream/stream-chat-android/blob/develop/scripts/ | ||
// Create variables with empty default values | ||
ext["ossrhUsername"] = '' | ||
ext["ossrhPassword"] = '' | ||
ext["sonatypeStagingProfileId"] = '' | ||
ext["signing.keyId"] = '' | ||
ext["signing.password"] = '' | ||
ext["signing.secretKeyRingFile"] = '' | ||
|
||
File secretPropsFile = project.rootProject.file('local.properties') | ||
if (secretPropsFile.exists()) { | ||
// Read local.properties file first if it exists | ||
Properties p = new Properties() | ||
new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) } | ||
p.each { name, value -> ext[name] = value } | ||
} | ||
// Use system environment variables | ||
ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') ?: ext["ossrhUsername"] | ||
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') ?: ext["ossrhPassword"] | ||
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') ?: ext["sonatypeStagingProfileId"] | ||
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') ?: ext["signing.keyId"] | ||
ext["signing.password"] = System.getenv('SIGNING_PASSWORD') ?: ext["signing.password"] | ||
ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') ?: ext["signing.secretKeyRingFile"] | ||
|
||
/* | ||
// Set up Sonatype repository | ||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
stagingProfileId = sonatypeStagingProfileId | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
} | ||
} | ||
} | ||
*/ |