Publish to Maven Central

pull/1111/head
Mattia Iavarone 4 years ago
parent 431389b00c
commit 79de1f05b0
  1. 1
      .github/workflows/build.yml
  2. 15
      .github/workflows/deploy.yml
  3. 23
      .github/workflows/snapshot.yml
  4. 2
      LICENSE
  5. 2
      README.md
  6. 2
      build.gradle.kts
  7. 26
      cameraview/build.gradle.kts
  8. 2
      docs/_about/faq.md
  9. 6
      docs/_about/install.md
  10. 2
      docs/_config.yml
  11. 2
      docs/_extra/contributing.md

@ -4,7 +4,6 @@ name: Build
on: on:
push: push:
branches: branches:
- master
- main - main
pull_request: pull_request:
jobs: jobs:

@ -4,17 +4,18 @@ on:
release: release:
types: [published] types: [published]
jobs: jobs:
BINTRAY_UPLOAD: MAVEN_UPLOAD:
name: Bintray Upload name: Maven Upload
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
BINTRAY_REPO: ${{ secrets.BINTRAY_REPO }} SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-java@v1 - uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 1.8
- name: Perform bintray upload - name: Perform maven upload
run: ./gradlew cameraview:publishToBintray run: ./gradlew publishToSonatype

@ -0,0 +1,23 @@
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
# Renaming ? Change the README badge.
name: Snapshot
on:
push:
branches:
- main
jobs:
SNAPSHOT:
name: Publish Snapshot
runs-on: ubuntu-latest
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Publish sonatype snapshot
run: ./gradlew publishToSonatypeSnapshot

@ -1,7 +1,7 @@
Copyrights for portions of project CameraView are held by WonderKiln, Inc as Copyrights for portions of project CameraView are held by WonderKiln, Inc as
part of project CameraKit-Android (https://github.com/wonderkiln/CameraKit-Android). part of project CameraKit-Android (https://github.com/wonderkiln/CameraKit-Android).
Their original license is available below, or at Their original license is available below, or at
https://github.com/wonderkiln/CameraKit-Android/blob/master/LICENSE . https://github.com/wonderkiln/CameraKit-Android/blob/main/LICENSE .
All other copyrights for project CameraView are held by Otalia Studios, 2017. All other copyrights for project CameraView are held by Otalia Studios, 2017.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------

@ -1,5 +1,5 @@
[![Build Status](https://github.com/natario1/CameraView/workflows/Build/badge.svg?event=push)](https://github.com/natario1/CameraView/actions) [![Build Status](https://github.com/natario1/CameraView/workflows/Build/badge.svg?event=push)](https://github.com/natario1/CameraView/actions)
[![Code Coverage](https://codecov.io/gh/natario1/CameraView/branch/master/graph/badge.svg)](https://codecov.io/gh/natario1/CameraView) [![Code Coverage](https://codecov.io/gh/natario1/CameraView/branch/main/graph/badge.svg)](https://codecov.io/gh/natario1/CameraView)
[![Release](https://img.shields.io/github/release/natario1/CameraView.svg)](https://github.com/natario1/CameraView/releases) [![Release](https://img.shields.io/github/release/natario1/CameraView.svg)](https://github.com/natario1/CameraView/releases)
[![Issues](https://img.shields.io/github/issues-raw/natario1/CameraView.svg)](https://github.com/natario1/CameraView/issues) [![Issues](https://img.shields.io/github/issues-raw/natario1/CameraView.svg)](https://github.com/natario1/CameraView/issues)
[![Funding](https://img.shields.io/opencollective/all/CameraView.svg?colorB=r)](https://natario1.github.io/CameraView/extra/donate) [![Funding](https://img.shields.io/opencollective/all/CameraView.svg?colorB=r)](https://natario1.github.io/CameraView/extra/donate)

@ -8,7 +8,6 @@ buildscript {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
jcenter()
} }
dependencies { dependencies {
@ -23,7 +22,6 @@ allprojects {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
jcenter()
} }
} }

@ -51,14 +51,26 @@ publisher {
project.group = "com.otaliastudios" project.group = "com.otaliastudios"
project.url = "https://github.com/natario1/CameraView" project.url = "https://github.com/natario1/CameraView"
project.addLicense(License.APACHE_2_0) project.addLicense(License.APACHE_2_0)
bintray { release.sources = Release.SOURCES_AUTO
release.sources = Release.SOURCES_AUTO release.docs = Release.DOCS_AUTO
release.docs = Release.DOCS_AUTO
auth.user = "BINTRAY_USER"
auth.key = "BINTRAY_KEY"
auth.repo = "BINTRAY_REPO"
}
directory() directory()
sonatype {
auth.user = "SONATYPE_USER"
auth.password = "SONATYPE_PASSWORD"
signing.key = "SIGNING_KEY"
signing.password = "SIGNING_PASSWORD"
}
sonatype("snapshot") {
repository = io.deepmedia.tools.publisher.sonatype.Sonatype.OSSRH_SNAPSHOT_1
release.version = "latest-SNAPSHOT"
auth.user = "SONATYPE_USER"
auth.password = "SONATYPE_PASSWORD"
signing.key = "SIGNING_KEY"
signing.password = "SIGNING_PASSWORD"
}
} }
// Code Coverage // Code Coverage

@ -87,7 +87,7 @@ and maintainers have had time to execute and publish the release. You can speed
[sponsoring the project](../extra/donate) or pull snapshots from [jitpack.io](https://jitpack.io): [sponsoring the project](../extra/donate) or pull snapshots from [jitpack.io](https://jitpack.io):
```groovy ```groovy
implementation 'com.github.natario1:CameraView:master-SNAPSHOT' implementation 'com.github.natario1:CameraView:main-SNAPSHOT'
implementation 'com.github.natario1:CameraView:<commit hash>' implementation 'com.github.natario1:CameraView:<commit hash>'
``` ```

@ -7,13 +7,13 @@ order: 1
The library works on API 15+, which is the only requirement and should be met by most projects nowadays. The library works on API 15+, which is the only requirement and should be met by most projects nowadays.
It is publicly hosted on [JCenter](https://bintray.com/natario/android/CameraView), where you It is publicly hosted on [Maven Central](https://repo.maven.apache.org/maven2/com/otaliastudios/cameraview), where you
can download the AAR package. To fetch with Gradle, make sure you add the JCenter repository in your root projects `build.gradle` file: can download the AAR package. To fetch with Gradle, make sure you add the Maven Central repository in your root projects `build.gradle` file:
```groovy ```groovy
allprojects { allprojects {
repositories { repositories {
jcenter() mavenCentral()
} }
} }
``` ```

@ -13,7 +13,7 @@ google_site_verification: '4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4'
github: [metadata] # TODO What's this? github: [metadata] # TODO What's this?
github_repo: CameraView github_repo: CameraView
github_version: 2.7.0 github_version: 2.7.0
github_branch: master github_branch: main
baseurl: '/CameraView' # Keep as an empty string if served up at the root baseurl: '/CameraView' # Keep as an empty string if served up at the root
collections: collections:
about: about:

@ -48,4 +48,4 @@ and [Google's CameraView](https://github.com/google/cameraview), but has been co
CameraKit's source code is licensed under the [MIT](https://github.com/wonderkiln/CameraKit-Android/blob/master/LICENSE) license. CameraKit's source code is licensed under the [MIT](https://github.com/wonderkiln/CameraKit-Android/blob/master/LICENSE) license.
CameraView is licensed under the [MIT](https://github.com/natario1/CameraView/blob/master/LICENSE) license as well. CameraView is licensed under the [MIT](https://github.com/natario1/CameraView/blob/main/LICENSE) license as well.

Loading…
Cancel
Save