Skip to content

Commit

Permalink
Release 2.7.1 (#1111)
Browse files Browse the repository at this point in the history
* Update dependencies

* Don't crash onConfigureFailed

* Publish to Maven Central

* Release 2.7.1
  • Loading branch information
natario1 authored Jul 2, 2021
1 parent ceb0eca commit 994b1dd
Show file tree
Hide file tree
Showing 15 changed files with 96 additions and 45 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: Build
on:
push:
branches:
- master
- main
pull_request:
jobs:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 23 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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.

------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -22,7 +22,7 @@ CameraView is a well documented, high-level library that makes capturing picture
addressing most of the common issues and needs, and still leaving you with flexibility where needed.

```groovy
api 'com.otaliastudios:cameraview:2.7.0'
api 'com.otaliastudios:cameraview:2.7.1'
```

- Fast & reliable
Expand Down
8 changes: 3 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ buildscript {
repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath("com.android.tools.build:gradle:4.1.2")
classpath("io.deepmedia.tools:publisher:0.4.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21")
classpath("com.android.tools.build:gradle:4.2.2")
classpath("io.deepmedia.tools:publisher:0.6.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20")

}
}
Expand All @@ -23,7 +22,6 @@ allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}

Expand Down
44 changes: 27 additions & 17 deletions cameraview/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
setMinSdkVersion(property("minSdkVersion") as Int)
setTargetSdkVersion(property("targetSdkVersion") as Int)
versionCode = 1
versionName = "2.7.0"
versionName = "2.7.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArgument("filter", "" +
"com.otaliastudios.cameraview.tools.SdkExcludeFilter," +
Expand All @@ -28,17 +28,17 @@ dependencies {
testImplementation("junit:junit:4.13")
testImplementation("org.mockito:mockito-inline:2.28.2")

androidTestImplementation("androidx.test:runner:1.3.0")
androidTestImplementation("androidx.test:rules:1.3.0")
androidTestImplementation("androidx.test.ext:junit:1.1.2")
androidTestImplementation("androidx.test:runner:1.4.0")
androidTestImplementation("androidx.test:rules:1.4.0")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("org.mockito:mockito-android:2.28.2")
androidTestImplementation("androidx.test.espresso:espresso-core:3.2.0")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")

api("androidx.exifinterface:exifinterface:1.3.2")
api("androidx.lifecycle:lifecycle-common:2.2.0")
api("com.google.android.gms:play-services-tasks:17.2.0")
implementation("androidx.annotation:annotation:1.1.0")
implementation("com.otaliastudios.opengl:egloo:0.5.3")
api("androidx.lifecycle:lifecycle-common:2.3.1")
api("com.google.android.gms:play-services-tasks:17.2.1")
implementation("androidx.annotation:annotation:1.2.0")
implementation("com.otaliastudios.opengl:egloo:0.6.1")
}

// Publishing
Expand All @@ -51,15 +51,25 @@ 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"
}
directory {
directory = file(repositories.mavenLocal().url).absolutePath

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"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,15 @@ public void onConfigured(@NonNull CameraCaptureSession session) {

@Override
public void onConfigureFailed(@NonNull CameraCaptureSession session) {
// This SHOULD be a library error so we throw a RuntimeException.
String message = LOG.e("onConfigureFailed! Session", session);
throw new RuntimeException(message);
Throwable cause = new RuntimeException(message);
if (!task.getTask().isComplete()) {
task.trySetException(new CameraException(cause,
CameraException.REASON_FAILED_TO_START_PREVIEW));
} else {
// Like onStartEngine.onError
throw new CameraException(CameraException.REASON_DISCONNECTED);
}
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ android {

dependencies {
implementation(project(":cameraview"))
implementation("androidx.appcompat:appcompat:1.2.0")
implementation("com.google.android.material:material:1.2.0")
implementation("androidx.appcompat:appcompat:1.3.0")
implementation("com.google.android.material:material:1.4.0")
}
14 changes: 14 additions & 0 deletions docs/_about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ New versions are released through GitHub, so the reference page is the [GitHub R
> Starting from 2.4.0, you can now [support development](https://github.com/sponsors/natario1) through the GitHub Sponsors program.
Companies can share a tiny part of their revenue and get private support hours in return. Thanks!

##### v2.7.1

- Fix: fix preview issues on Pixel 4A with certain FPS, thanks to [@honzasmuk][honzasmuk] ([#1089][1089])
- Improvement: don't catch gestures if they're turned off, thanks to [@ObsidianX][ObsidianX] ([#1068][1068])
- New: new flag cameraDrawHardwareOverlays and setDrawHardwareOverlays() to draw overlays on hardware canvas, thanks to [@ObsidianX][ObsidianX] ([#1066][1066])
- Publish on Maven Central instead of JCenter

<https://github.com/natario1/CameraView/compare/v2.7.0...v2.7.1>

##### v2.7.0

- New: onPictureShutter() callback when taking pictures, thanks to [@EzequielAdrianM][EzequielAdrianM] ([#1030][1030])
Expand Down Expand Up @@ -359,6 +368,8 @@ This is the last release before v2.
[jeffreyfjohnson]: https://github.com/jeffreyfjohnson
[michaelspecht]: https://github.com/michaelspecht
[EzequielAdrianM]: https://github.com/EzequielAdrianM
[honzasmuk]: https://github.com/honzasmuk
[ObsidianX]: https://github.com/ObsidianX


[73]: https://github.com/natario1/CameraView/pull/73
Expand Down Expand Up @@ -462,3 +473,6 @@ This is the last release before v2.
[1020]: https://github.com/natario1/CameraView/pull/1020
[1024]: https://github.com/natario1/CameraView/pull/1024
[1030]: https://github.com/natario1/CameraView/pull/1030
[1089]: https://github.com/natario1/CameraView/pull/1089
[1068]: https://github.com/natario1/CameraView/pull/1068
[1066]: https://github.com/natario1/CameraView/pull/1066
2 changes: 1 addition & 1 deletion docs/_about/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<commit hash>'
```

Expand Down
6 changes: 3 additions & 3 deletions docs/_about/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ google_analytics_id: 'UA-155077779-1'
google_site_verification: '4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4'
github: [metadata] # TODO What's this?
github_repo: CameraView
github_version: 2.7.0
github_branch: master
github_version: 2.7.1
github_branch: main
baseurl: '/CameraView' # Keep as an empty string if served up at the root
collections:
about:
Expand Down
2 changes: 1 addition & 1 deletion docs/_extra/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip

0 comments on commit 994b1dd

Please sign in to comment.