diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 395539b5..9ccf2610 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,6 @@ name: Build on: push: branches: - - master - main pull_request: jobs: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7eed30cd..4fcf2fbb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,17 +4,18 @@ on: release: types: [published] jobs: - BINTRAY_UPLOAD: - name: Bintray Upload + MAVEN_UPLOAD: + name: Maven Upload runs-on: ubuntu-latest env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }} - BINTRAY_REPO: ${{ secrets.BINTRAY_REPO }} + 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: Perform bintray upload - run: ./gradlew cameraview:publishToBintray + - name: Perform maven upload + run: ./gradlew publishToSonatype diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 00000000..dae1ea77 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -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 \ No newline at end of file diff --git a/LICENSE b/LICENSE index dc04615b..b44d8842 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ Copyrights for portions of project CameraView are held by WonderKiln, Inc as part of project CameraKit-Android (https://github.com/wonderkiln/CameraKit-Android). 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. ------------------------------------------------------------------------------ diff --git a/README.md b/README.md index c3aee6ec..49e14540 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![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) [![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) diff --git a/build.gradle.kts b/build.gradle.kts index 90d49e73..be75b022 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,6 @@ buildscript { repositories { google() mavenCentral() - jcenter() } dependencies { @@ -23,7 +22,6 @@ allprojects { repositories { google() mavenCentral() - jcenter() } } diff --git a/cameraview/build.gradle.kts b/cameraview/build.gradle.kts index 06f2f5ad..df9fa1ba 100644 --- a/cameraview/build.gradle.kts +++ b/cameraview/build.gradle.kts @@ -51,14 +51,26 @@ publisher { project.group = "com.otaliastudios" project.url = "https://github.com/natario1/CameraView" project.addLicense(License.APACHE_2_0) - bintray { - release.sources = Release.SOURCES_AUTO - release.docs = Release.DOCS_AUTO - auth.user = "BINTRAY_USER" - auth.key = "BINTRAY_KEY" - auth.repo = "BINTRAY_REPO" - } + release.sources = Release.SOURCES_AUTO + release.docs = Release.DOCS_AUTO + 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 diff --git a/docs/_about/faq.md b/docs/_about/faq.md index 72daf34e..08800f70 100644 --- a/docs/_about/faq.md +++ b/docs/_about/faq.md @@ -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): ```groovy -implementation 'com.github.natario1:CameraView:master-SNAPSHOT' +implementation 'com.github.natario1:CameraView:main-SNAPSHOT' implementation 'com.github.natario1:CameraView:' ``` diff --git a/docs/_about/install.md b/docs/_about/install.md index d653a721..00bc560e 100644 --- a/docs/_about/install.md +++ b/docs/_about/install.md @@ -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. -It is publicly hosted on [JCenter](https://bintray.com/natario/android/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: +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 Maven Central repository in your root projects `build.gradle` file: ```groovy allprojects { repositories { - jcenter() + mavenCentral() } } ``` diff --git a/docs/_config.yml b/docs/_config.yml index 17f87a18..40e1b35b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -13,7 +13,7 @@ google_site_verification: '4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4' github: [metadata] # TODO What's this? github_repo: CameraView github_version: 2.7.0 -github_branch: master +github_branch: main baseurl: '/CameraView' # Keep as an empty string if served up at the root collections: about: diff --git a/docs/_extra/contributing.md b/docs/_extra/contributing.md index db2cf651..346ec94a 100644 --- a/docs/_extra/contributing.md +++ b/docs/_extra/contributing.md @@ -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. -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.