This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
125 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
apply from: "$rootDir/gradle/versions.gradle" | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
task javadocJar(type: Jar) { | ||
archiveClassifier.set('javadoc') | ||
} | ||
|
||
artifacts { | ||
archives javadocJar | ||
} | ||
|
||
group = "io.github.kuuuurt" | ||
version = ext["MP_PAGING_VERSION"] | ||
|
||
afterEvaluate { | ||
apply from: "$rootDir/gradle/versions.gradle" | ||
|
||
publishing { | ||
publications { | ||
withType(MavenPublication) { | ||
if (name.contains("kotlinMultiplatform")) { | ||
artifactId "multiplatform-paging" | ||
} else { | ||
artifactId "multiplatform-paging-$name" | ||
} | ||
|
||
groupId group | ||
version version | ||
|
||
artifact javadocJar | ||
|
||
pom { | ||
name = "multiplatform-paging" | ||
description = "A Kotlin Multiplatform library for pagination on Android and iOS" | ||
url = "https://github.com/kuuuurt/multiplatform-paging" | ||
licenses { | ||
license { | ||
name = "Apache-2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'kuuuurt' | ||
name = 'Kurt Renzo Acosta' | ||
email = "kurt.r.acosta@gmail.com" | ||
} | ||
} | ||
scm { | ||
connection = "https://github.com/kuuuurt/multiplatform-paging.git" | ||
developerConnection = "https://github.com/kuuuurt/multiplatform-paging.git" | ||
url = "https://github.com/kuuuurt/multiplatform-paging" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
rootProject.ext["signing.keyId"], | ||
rootProject.ext["signing.key"], | ||
rootProject.ext["signing.password"], | ||
) | ||
sign publishing.publications | ||
} |
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,36 @@ | ||
// Create variables with empty default values | ||
ext["ossrhUsername"] = '' | ||
ext["ossrhPassword"] = '' | ||
ext["sonatypeStagingProfileId"] = '' | ||
ext["signing.keyId"] = '' | ||
ext["signing.password"] = '' | ||
ext["signing.key"] = '' | ||
|
||
File secretPropsFile = project.rootProject.file('sonatype.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 } | ||
} else { | ||
// Use system environment variables | ||
ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') | ||
ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') | ||
ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') | ||
ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') | ||
ext["signing.password"] = System.getenv('SIGNING_PASSWORD') | ||
ext["signing.key"] = System.getenv('SIGNING_KEY') | ||
} | ||
|
||
// Set up Sonatype repository | ||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/") | ||
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
stagingProfileId = sonatypeStagingProfileId | ||
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,3 @@ | ||
ext['KOTLIN_VERSION'] = "1.8.0" | ||
ext['COROUTINES_VERSION'] = "1.6.4" | ||
ext['MP_PAGING_VERSION'] = "0.6.1" |
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