-
Notifications
You must be signed in to change notification settings - Fork 2
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 #36 from leandroBorgesFerreira/Publish
Publish
- Loading branch information
Showing
102 changed files
with
550 additions
and
388 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,29 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
publish: | ||
name: Release build and publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: '17' | ||
- name: Release build | ||
run: ./gradlew assembleRelease --scan | ||
- name: Publish to MavenCentral | ||
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 --scan | ||
env: | ||
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | ||
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} |
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
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
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
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,80 @@ | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
apply plugin: 'org.jetbrains.dokka' | ||
|
||
group = PUBLISH_GROUP_ID | ||
version = PUBLISH_VERSION | ||
|
||
task androidSourcesJar(type: Jar) { | ||
archiveClassifier.set('sources') | ||
|
||
from android.sourceSets.main.java.srcDirs | ||
from android.sourceSets.main.kotlin.srcDirs | ||
} | ||
|
||
tasks.withType(dokkaHtmlPartial.getClass()).configureEach { | ||
pluginsMapConfiguration.set( | ||
["org.jetbrains.dokka.base.DokkaBase": """{ "separateInheritedMembers": true}"""] | ||
) | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) { | ||
archiveClassifier.set('javadoc') | ||
from dokkaJavadoc.outputDirectory | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
archives javadocJar | ||
} | ||
|
||
afterEvaluate { project -> | ||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
groupId "com.github.leandroborgesferreira" | ||
artifactId PUBLISH_ARTIFACT_ID | ||
version PUBLISH_VERSION | ||
|
||
from components.release | ||
|
||
artifact androidSourcesJar | ||
artifact javadocJar | ||
|
||
pom { | ||
name = "storyteller" | ||
description = "A library to create complex text editors inside apps" | ||
url = 'https://https://github.com/leandroBorgesFerreira/StoryTeller' | ||
licenses { | ||
license { | ||
name = 'The Apache Software License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'leandroBorgesFerreira' | ||
name = 'Leandro Borges Ferreira' | ||
email = "[email protected]" | ||
url = "https://github.com/leandroBorgesFerreira" | ||
} | ||
} | ||
scm { | ||
connection = "scm:[email protected]:leandroBorgesFerreira/StoryTeller.git" | ||
developerConnection = "scm:git:ssh://github.com/leandroBorgesFerreira/StoryTeller.git" | ||
url = "https://github.com/leandroBorgesFerreira/StoryTeller" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
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,35 @@ | ||
// Create variables with empty default values | ||
ext["ossrhUsername"] = '' | ||
ext["ossrhPassword"] = '' | ||
ext["sonatypeStagingProfileId"] = '' | ||
ext["signing.keyId"] = '' | ||
ext["signing.password"] = '' | ||
ext["signing.key"] = '' | ||
ext["snapshot"] = '' | ||
|
||
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 } | ||
} else { | ||
// Use system environment variables | ||
ext["ossrhUsername"] = System.getenv('SONATYPE_NEXUS_USERNAME') | ||
ext["ossrhPassword"] = System.getenv('SONATYPE_NEXUS_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') | ||
ext["snapshot"] = System.getenv('SNAPSHOT') | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
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
8 changes: 0 additions & 8 deletions
8
storyteller/src/main/java/br/com/leandroferreira/storyteller/manager/StoryStateSaver.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
storyteller/src/main/java/br/com/leandroferreira/storyteller/model/backtrack/AddStoryUnit.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
storyteller/src/main/java/br/com/leandroferreira/storyteller/model/change/CheckInfo.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
storyteller/src/main/java/br/com/leandroferreira/storyteller/model/change/DeleteInfo.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
storyteller/src/main/java/br/com/leandroferreira/storyteller/model/change/LineBreakInfo.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
storyteller/src/main/java/br/com/leandroferreira/storyteller/model/change/MoveInfo.kt
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
storyteller/src/main/java/br/com/leandroferreira/storyteller/model/document/Document.kt
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
storyteller/src/main/java/br/com/leandroferreira/storyteller/model/draganddrop/DropInfo.kt
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...teller/src/main/java/br/com/leandroferreira/storyteller/normalization/merge/StepMerger.kt
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
storyteller/src/main/java/br/com/leandroferreira/storyteller/repository/StoriesRepository.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.