Skip to content

Commit

Permalink
Maven update (#91)
Browse files Browse the repository at this point in the history
* Add gradle-maven-publish-plugin and dokka plugins

* Add values to gradle.properties

* Delete upload.gradle

* Replace with publish.yml for maven publish
  • Loading branch information
kinnerapriyap committed Feb 18, 2021
1 parent 10244a8 commit 66f6b5b
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 144 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# https://gist.github.com/sualeh/ae78dc16123899d7942bc38baba5203c
# https://github.com/rnett/compiler-plugin-utils/blob/f2cb49cdc683d24b3c6793fe1cbc6a76af29fc8f/.github/workflows/ci.yml

name: Upload to Bintray workflow

on:
release:
types: [ published ]

jobs:
upload:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v1
with:
java-version: 11

- name: Grant permission
run: chmod +x gradlew

- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Export secret key
run: gpg --export-secret-key ${{ secrets.OSSRH_GPG_ID }} > ~/.gnupg/secring.gpg

- name: Get release version
id: get_version
run: echo ::set-output name=VERSION_NAME::${GITHUB_REF/refs\/tags\//}

- name: Publish to central repository
env:
ORG_GRADLE_PROJECT_mavenCentralRepositoryPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralRepositoryUsername: ${{ secrets.SONATYPE_USERNAME }}
GRADLE_OPTS: -Xmx2048m -XX:MaxPermSize=512m
run: ./gradlew publish --no-daemon --no-parallel -Psigning.keyId=${{ secrets.OSSRH_GPG_ID }} -Psigning.secretKeyRingFile=/home/runner/.gnupg/secring.gpg -Psigning.password=${{ secrets.OSSRH_GPG_KEY_PASSWORD }} --stacktrace
31 changes: 0 additions & 31 deletions .github/workflows/upload.yml

This file was deleted.

14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ buildscript {
repositories {
google()
mavenCentral()

jcenter() {
content {
includeGroupByRegex "org\\.jetbrains.*"
}
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0-alpha06'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.3"
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.14.2'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.20'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -21,7 +27,11 @@ allprojects {
repositories {
google()
mavenCentral()

jcenter() {
content {
includeGroupByRegex "org\\.jetbrains.*"
}
}
}
}

Expand Down
22 changes: 22 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,25 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

GROUP=com.kinnerapriyap
POM_ARTIFACT_ID=sher-gil

POM_NAME=sher-gil
POM_DESCRIPTION=Media picker library in kotlin for Android
POM_PACKAGING=aar
POM_INCEPTION_YEAR=2020

POM_URL=https://github.com/kinnerapriyap/sher-gil
POM_SCM_URL=https://github.com/kinnerapriyap/sher-gil
POM_SCM_CONNECTION=scm:git:git://github.com/kinnerapriyap/sher-gil.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/kinnerapriyap/sher-gil.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=kinnerapriyap
POM_DEVELOPER_NAME=Kinnera Priya Putti
POM_DEVELOPER_URL=https://github.com/kinnerapriyap/
sourceLinkBranch=main
2 changes: 2 additions & 0 deletions sher-gil/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'androidx.navigation.safeargs.kotlin'
apply plugin: 'com.vanniktech.maven.publish'
apply plugin: 'org.jetbrains.dokka'

android {
compileSdkVersion 30
Expand Down
111 changes: 0 additions & 111 deletions sher-gil/upload.gradle

This file was deleted.

0 comments on commit 66f6b5b

Please sign in to comment.