-
Notifications
You must be signed in to change notification settings - Fork 8
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 #32 from icerockdev/develop
mavenCentral release
- Loading branch information
Showing
10 changed files
with
193 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Create release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version' | ||
default: '0.1.0' | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
name: Publish library at mavenCentral | ||
runs-on: macos-latest | ||
env: | ||
OSSRH_USER: ${{ secrets.OSSRH_USER }} | ||
OSSRH_KEY: ${{ secrets.OSSRH_KEY }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Publish | ||
run: ./gradlew publish | ||
release: | ||
name: Create release | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
commitish: ${{ github.ref }} | ||
tag_name: release/${{ github.event.inputs.version }} | ||
release_name: ${{ github.event.inputs.version }} | ||
body: "Will be filled later" | ||
draft: true |
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,14 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
google() | ||
|
||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20") | ||
} |
17 changes: 17 additions & 0 deletions
17
build-logic/src/main/kotlin/jvm-publication-convention.gradle.kts
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,17 @@ | ||
/* | ||
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
plugins { | ||
id("java") | ||
id("org.gradle.maven-publish") | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
publishing.publications.register("mavenJava", MavenPublication::class) { | ||
from(components["java"]) | ||
} |
79 changes: 79 additions & 0 deletions
79
build-logic/src/main/kotlin/publication-convention.gradle.kts
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,79 @@ | ||
/* | ||
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
import java.util.Base64 | ||
|
||
plugins { | ||
id("org.gradle.maven-publish") | ||
id("signing") | ||
} | ||
|
||
publishing { | ||
repositories.maven("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
name = "OSSRH" | ||
|
||
credentials { | ||
username = System.getenv("OSSRH_USER") | ||
password = System.getenv("OSSRH_KEY") | ||
} | ||
} | ||
|
||
publications.withType<MavenPublication> { | ||
// Provide artifacts information requited by Maven Central | ||
pom { | ||
name.set("Shaper") | ||
description.set("File structure generation tool from templates on Handlebars") | ||
url.set("https://github.com/icerockdev/shaper") | ||
licenses { | ||
license { | ||
name.set("Apache-2.0") | ||
distribution.set("repo") | ||
url.set("https://github.com/icerockdev/shaper/blob/master/LICENSE.md") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("Alex009") | ||
name.set("Aleksey Mikhailov") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("oyakovlev") | ||
name.set("Oleg Yakovlev") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("ATchernov") | ||
name.set("Andrey Tchernov") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("RezMike") | ||
name.set("Mikhail Reznichenko") | ||
email.set("[email protected]") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:ssh://github.com/icerockdev/shaper.git") | ||
developerConnection.set("scm:git:ssh://github.com/icerockdev/shaper.git") | ||
url.set("https://github.com/icerockdev/shaper") | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
signing { | ||
val signingKeyId: String? = System.getenv("SIGNING_KEY_ID") | ||
val signingPassword: String? = System.getenv("SIGNING_PASSWORD") | ||
val signingKey: String? = System.getenv("SIGNING_KEY")?.let { base64Key -> | ||
String(Base64.getDecoder().decode(base64Key)) | ||
} | ||
if (signingKeyId != null) { | ||
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) | ||
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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
plugins { | ||
id("org.jetbrains.kotlin.jvm") version "1.4.31" apply false | ||
/* | ||
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
google() | ||
|
||
gradlePluginPortal() | ||
} | ||
dependencies { | ||
classpath(":build-logic") | ||
} | ||
} | ||
|
||
subprojects { | ||
group = "dev.icerock.tools" | ||
version = "0.4.0" | ||
|
||
apply(plugin = "org.jetbrains.kotlin.jvm") | ||
} |
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,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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,12 +1,16 @@ | ||
/* | ||
* Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
rootProject.name = "shaper" | ||
|
||
dependencyResolutionManagement { | ||
repositories { | ||
mavenCentral() | ||
|
||
maven { url = uri("https://kotlin.bintray.com/kotlinx") } | ||
} | ||
} | ||
|
||
includeBuild("build-logic") | ||
|
||
include("shaper-core") | ||
include("shaper-cli") |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
*/ | ||
|
||
plugins { | ||
id("org.jetbrains.kotlin.jvm") | ||
id("application") | ||
} | ||
|
||
|
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