Release 2.7.1 (#1111)

* Update dependencies

* Don't crash onConfigureFailed

* Publish to Maven Central

* Release 2.7.1
pull/1049/head^2
Mattia Iavarone 3 years ago committed by GitHub
parent ceb0eca394
commit 994b1dd434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .github/workflows/build.yml
  2. 15
      .github/workflows/deploy.yml
  3. 23
      .github/workflows/snapshot.yml
  4. 2
      LICENSE
  5. 4
      README.md
  6. 8
      build.gradle.kts
  7. 44
      cameraview/build.gradle.kts
  8. 10
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera2Engine.java
  9. 4
      demo/build.gradle.kts
  10. 14
      docs/_about/changelog.md
  11. 2
      docs/_about/faq.md
  12. 6
      docs/_about/install.md
  13. 4
      docs/_config.yml
  14. 2
      docs/_extra/contributing.md
  15. 2
      gradle/wrapper/gradle-wrapper.properties

@ -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)
@ -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. addressing most of the common issues and needs, and still leaving you with flexibility where needed.
```groovy ```groovy
api 'com.otaliastudios:cameraview:2.7.0' api 'com.otaliastudios:cameraview:2.7.1'
``` ```
- Fast & reliable - Fast & reliable

@ -8,13 +8,12 @@ buildscript {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
jcenter()
} }
dependencies { dependencies {
classpath("com.android.tools.build:gradle:4.1.2") classpath("com.android.tools.build:gradle:4.2.2")
classpath("io.deepmedia.tools:publisher:0.4.1") classpath("io.deepmedia.tools:publisher:0.6.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20")
} }
} }
@ -23,7 +22,6 @@ allprojects {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
jcenter()
} }
} }

@ -14,7 +14,7 @@ android {
setMinSdkVersion(property("minSdkVersion") as Int) setMinSdkVersion(property("minSdkVersion") as Int)
setTargetSdkVersion(property("targetSdkVersion") as Int) setTargetSdkVersion(property("targetSdkVersion") as Int)
versionCode = 1 versionCode = 1
versionName = "2.7.0" versionName = "2.7.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArgument("filter", "" + testInstrumentationRunnerArgument("filter", "" +
"com.otaliastudios.cameraview.tools.SdkExcludeFilter," + "com.otaliastudios.cameraview.tools.SdkExcludeFilter," +
@ -28,17 +28,17 @@ dependencies {
testImplementation("junit:junit:4.13") testImplementation("junit:junit:4.13")
testImplementation("org.mockito:mockito-inline:2.28.2") testImplementation("org.mockito:mockito-inline:2.28.2")
androidTestImplementation("androidx.test:runner:1.3.0") androidTestImplementation("androidx.test:runner:1.4.0")
androidTestImplementation("androidx.test:rules:1.3.0") androidTestImplementation("androidx.test:rules:1.4.0")
androidTestImplementation("androidx.test.ext:junit:1.1.2") androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("org.mockito:mockito-android:2.28.2") 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.exifinterface:exifinterface:1.3.2")
api("androidx.lifecycle:lifecycle-common:2.2.0") api("androidx.lifecycle:lifecycle-common:2.3.1")
api("com.google.android.gms:play-services-tasks:17.2.0") api("com.google.android.gms:play-services-tasks:17.2.1")
implementation("androidx.annotation:annotation:1.1.0") implementation("androidx.annotation:annotation:1.2.0")
implementation("com.otaliastudios.opengl:egloo:0.5.3") implementation("com.otaliastudios.opengl:egloo:0.6.1")
} }
// Publishing // Publishing
@ -51,15 +51,25 @@ 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" directory()
auth.key = "BINTRAY_KEY"
auth.repo = "BINTRAY_REPO" 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"
} }
} }

@ -590,9 +590,15 @@ public class Camera2Engine extends CameraBaseEngine implements
@Override @Override
public void onConfigureFailed(@NonNull CameraCaptureSession session) { public void onConfigureFailed(@NonNull CameraCaptureSession session) {
// This SHOULD be a library error so we throw a RuntimeException.
String message = LOG.e("onConfigureFailed! Session", session); 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 @Override

@ -18,6 +18,6 @@ android {
dependencies { dependencies {
implementation(project(":cameraview")) implementation(project(":cameraview"))
implementation("androidx.appcompat:appcompat:1.2.0") implementation("androidx.appcompat:appcompat:1.3.0")
implementation("com.google.android.material:material:1.2.0") implementation("com.google.android.material:material:1.4.0")
} }

@ -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. > 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! 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 ##### v2.7.0
- New: onPictureShutter() callback when taking pictures, thanks to [@EzequielAdrianM][EzequielAdrianM] ([#1030][1030]) - New: onPictureShutter() callback when taking pictures, thanks to [@EzequielAdrianM][EzequielAdrianM] ([#1030][1030])
@ -359,6 +368,8 @@ This is the last release before v2.
[jeffreyfjohnson]: https://github.com/jeffreyfjohnson [jeffreyfjohnson]: https://github.com/jeffreyfjohnson
[michaelspecht]: https://github.com/michaelspecht [michaelspecht]: https://github.com/michaelspecht
[EzequielAdrianM]: https://github.com/EzequielAdrianM [EzequielAdrianM]: https://github.com/EzequielAdrianM
[honzasmuk]: https://github.com/honzasmuk
[ObsidianX]: https://github.com/ObsidianX
[73]: https://github.com/natario1/CameraView/pull/73 [73]: https://github.com/natario1/CameraView/pull/73
@ -462,3 +473,6 @@ This is the last release before v2.
[1020]: https://github.com/natario1/CameraView/pull/1020 [1020]: https://github.com/natario1/CameraView/pull/1020
[1024]: https://github.com/natario1/CameraView/pull/1024 [1024]: https://github.com/natario1/CameraView/pull/1024
[1030]: https://github.com/natario1/CameraView/pull/1030 [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

@ -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()
} }
} }
``` ```

@ -12,8 +12,8 @@ google_analytics_id: 'UA-155077779-1'
google_site_verification: '4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4' 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.1
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.

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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

Loading…
Cancel
Save