-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from fleeksoft/kotlinx-io
prepare for v0.1.3 publish
- Loading branch information
Showing
5 changed files
with
118 additions
and
173 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,49 @@ | ||
name: Publish docs | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
deploy_docs: | ||
if: ${{ github.event_name != 'pull_request' }} | ||
runs-on: macos-latest | ||
needs: | ||
- build | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Setup gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Generate docs with dokka | ||
run: ./gradlew dokkaHtmlMultiModule | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ${{ github.workspace }}/build/dokka/htmlMultiModule | ||
|
||
- name: Release to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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 |
---|---|---|
|
@@ -4,8 +4,7 @@ plugins { | |
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.dokka) | ||
id("maven-publish") | ||
id("signing") | ||
alias(libs.plugins.mavenPublish) | ||
} | ||
|
||
group = "com.fleeksoft.ksoup" | ||
|
@@ -127,69 +126,32 @@ android { | |
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2") | ||
credentials { | ||
username = gradleLocalProperties(rootDir).getProperty("mavenCentralUsername") | ||
password = gradleLocalProperties(rootDir).getProperty("mavenCentralPassword") | ||
mavenPublishing { | ||
coordinates("com.fleeksoft.ksoup", "ksoup-network", libs.versions.libraryVersion.get()) | ||
pom { | ||
name.set("ksoup-network") | ||
description.set("Ksoup is a Kotlin Multiplatform library for working with HTML and XML, and offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM and CSS selectors.") | ||
licenses { | ||
license { | ||
name.set("Apache-2.0") | ||
url.set("https://opensource.org/licenses/Apache-2.0") | ||
} | ||
} | ||
} | ||
|
||
val javadocJar = | ||
tasks.register<Jar>("javadocJar") { | ||
dependsOn(tasks.dokkaHtml) | ||
archiveClassifier.set("javadoc") | ||
from("${layout.buildDirectory}/dokka") | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/fleeksoft/ksoup/issues") | ||
} | ||
|
||
publications { | ||
withType<MavenPublication> { | ||
artifact(javadocJar) | ||
pom { | ||
name.set("ksoup-network") | ||
description.set( | ||
"Ksoup is a Kotlin Multiplatform library for working with HTML and XML, and offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM and CSS selectors.", | ||
) | ||
licenses { | ||
license { | ||
name.set("Apache-2.0") | ||
url.set("https://opensource.org/licenses/Apache-2.0") | ||
} | ||
} | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/fleeksoft/ksoup/issues") | ||
} | ||
scm { | ||
connection.set("https://github.com/fleeksoft/ksoup.git") | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
} | ||
developers { | ||
developer { | ||
name.set("Sabeeh Ul Hussnain") | ||
email.set("[email protected]") | ||
organization.set("Fleek Soft") | ||
} | ||
} | ||
scm { | ||
connection.set("https://github.com/fleeksoft/ksoup.git") | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
} | ||
developers { | ||
developer { | ||
name.set("Sabeeh Ul Hussnain Anjum") | ||
email.set("[email protected]") | ||
organization.set("Fleek Soft") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
// File(rootDir, "gpg/private.key").readText(), | ||
gradleLocalProperties(rootDir).getProperty("gpgKeySecret"), | ||
gradleLocalProperties(rootDir).getProperty("gpgKeyPassword"), | ||
) | ||
sign(publishing.publications) | ||
} | ||
|
||
// TODO: remove after https://youtrack.jetbrains.com/issue/KT-46466 is fixed | ||
project.tasks.withType(AbstractPublishToMaven::class.java).configureEach { | ||
dependsOn(project.tasks.withType(Sign::class.java)) | ||
} |
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 |
---|---|---|
@@ -1,11 +1,8 @@ | ||
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties | ||
|
||
plugins { | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.dokka) | ||
id("maven-publish") | ||
id("signing") | ||
alias(libs.plugins.mavenPublish) | ||
} | ||
|
||
group = "com.fleeksoft.ksoup" | ||
|
@@ -125,72 +122,36 @@ android { | |
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2") | ||
credentials { | ||
username = gradleLocalProperties(rootDir).getProperty("mavenCentralUsername") | ||
password = gradleLocalProperties(rootDir).getProperty("mavenCentralPassword") | ||
mavenPublishing { | ||
coordinates("com.fleeksoft.ksoup", "ksoup", libs.versions.libraryVersion.get()) | ||
pom { | ||
name.set("ksoup") | ||
description.set("Ksoup is a Kotlin Multiplatform library for working with HTML and XML, and offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM and CSS selectors.") | ||
licenses { | ||
license { | ||
name.set("Apache-2.0") | ||
url.set("https://opensource.org/licenses/Apache-2.0") | ||
} | ||
} | ||
} | ||
|
||
val javadocJar = | ||
tasks.register<Jar>("javadocJar") { | ||
dependsOn(tasks.dokkaHtml) | ||
archiveClassifier.set("javadoc") | ||
from("${layout.buildDirectory}/dokka") | ||
} | ||
|
||
publications { | ||
withType<MavenPublication> { | ||
artifact(javadocJar) | ||
pom { | ||
name.set("Ksoup") | ||
description.set( | ||
"Ksoup is a Kotlin Multiplatform library for working with HTML and XML, and offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM and CSS selectors.", | ||
) | ||
licenses { | ||
license { | ||
name.set("Apache-2.0") | ||
url.set("https://opensource.org/licenses/Apache-2.0") | ||
} | ||
} | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/fleeksoft/ksoup/issues") | ||
} | ||
scm { | ||
connection.set("https://github.com/fleeksoft/ksoup.git") | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
} | ||
developers { | ||
developer { | ||
name.set("Sabeeh Ul Hussnain") | ||
email.set("[email protected]") | ||
organization.set("Fleek Soft") | ||
} | ||
} | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/fleeksoft/ksoup/issues") | ||
} | ||
scm { | ||
connection.set("https://github.com/fleeksoft/ksoup.git") | ||
url.set("https://github.com/fleeksoft/ksoup") | ||
} | ||
developers { | ||
developer { | ||
name.set("Sabeeh Ul Hussnain Anjum") | ||
email.set("[email protected]") | ||
organization.set("Fleek Soft") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
// File(rootDir, "gpg/private.key").readText(), | ||
gradleLocalProperties(rootDir).getProperty("gpgKeySecret"), | ||
gradleLocalProperties(rootDir).getProperty("gpgKeyPassword"), | ||
) | ||
sign(publishing.publications) | ||
} | ||
|
||
// TODO: remove after https://youtrack.jetbrains.com/issue/KT-46466 is fixed | ||
project.tasks.withType(AbstractPublishToMaven::class.java).configureEach { | ||
dependsOn(project.tasks.withType(Sign::class.java)) | ||
} | ||
val isGithubActions: Boolean = System.getenv("GITHUB_ACTIONS")?.toBoolean() == true | ||
val generateBuildConfigFile: Task by tasks.creating { | ||
group = "build setup" | ||
|