Skip to content

Commit

Permalink
Aperture: Update CameraX to 1.4.0-alpha05
Browse files Browse the repository at this point in the history
Change-Id: I003ea35d909eea2117aff465e0e848eb802a8c0d
  • Loading branch information
luk1337 authored and SebaUbuntu committed May 2, 2024
1 parent cf3e6b1 commit 262ef2e
Show file tree
Hide file tree
Showing 38 changed files with 99 additions and 17 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply {

buildscript {
repositories {
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.7/.m2")
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.8/.m2")
}

dependencies {
Expand Down Expand Up @@ -84,7 +84,7 @@ dependencies {
implementation("com.google.android.material:material:1.9.0")

// CameraX core library using the camera2 implementation
val cameraxVersion = "1.4.0-alpha04"
val cameraxVersion = "1.4.0-alpha05"
// The following line is optional, as the core library is included indirectly by camera-camera2
implementation("androidx.camera:camera-core:${cameraxVersion}")
implementation("androidx.camera:camera-camera2:${cameraxVersion}")
Expand Down
84 changes: 72 additions & 12 deletions app/libs/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

android_library_import {
name: "Aperture_androidx.camera_camera-camera2-nodeps",
aars: ["androidx/camera/camera-camera2/1.4.0-alpha04/camera-camera2-1.4.0-alpha04.aar"],
aars: ["androidx/camera/camera-camera2/1.4.0-alpha05/camera-camera2-1.4.0-alpha05.aar"],
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
Expand All @@ -32,7 +32,7 @@ android_library {
"//apex_available:platform",
"//apex_available:anyapex",
],
manifest: "androidx/camera/camera-camera2/1.4.0-alpha04/AndroidManifest.xml",
manifest: "androidx/camera/camera-camera2/1.4.0-alpha05/AndroidManifest.xml",
static_libs: [
"Aperture_androidx.camera_camera-camera2-nodeps",
"Aperture_androidx.camera_camera-core",
Expand All @@ -47,7 +47,7 @@ android_library {

android_library_import {
name: "Aperture_androidx.camera_camera-core-nodeps",
aars: ["androidx/camera/camera-core/1.4.0-alpha04/camera-core-1.4.0-alpha04.aar"],
aars: ["androidx/camera/camera-core/1.4.0-alpha05/camera-core-1.4.0-alpha05.aar"],
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
Expand All @@ -59,12 +59,14 @@ android_library_import {
"androidx.annotation_annotation",
"androidx.annotation_annotation-experimental",
"androidx.concurrent_concurrent-futures",
"androidx.concurrent_concurrent-futures-ktx",
"androidx.core_core",
"androidx.exifinterface_exifinterface",
"androidx.lifecycle_lifecycle-livedata",
"auto_value_annotations",
"guava",
"kotlin-stdlib",
"kotlinx-coroutines-android",
],
}

Expand All @@ -76,26 +78,28 @@ android_library {
"//apex_available:platform",
"//apex_available:anyapex",
],
manifest: "androidx/camera/camera-core/1.4.0-alpha04/AndroidManifest.xml",
manifest: "androidx/camera/camera-core/1.4.0-alpha05/AndroidManifest.xml",
static_libs: [
"Aperture_androidx.camera_camera-core-nodeps",
"Aperture_androidx.lifecycle_lifecycle-common",
"androidx.annotation_annotation",
"androidx.annotation_annotation-experimental",
"androidx.concurrent_concurrent-futures",
"androidx.concurrent_concurrent-futures-ktx",
"androidx.core_core",
"androidx.exifinterface_exifinterface",
"androidx.lifecycle_lifecycle-livedata",
"auto_value_annotations",
"guava",
"kotlin-stdlib",
"kotlinx-coroutines-android",
],
java_version: "1.7",
}

android_library_import {
name: "Aperture_androidx.camera_camera-extensions-nodeps",
aars: ["androidx/camera/camera-extensions/1.4.0-alpha04/camera-extensions-1.4.0-alpha04.aar"],
aars: ["androidx/camera/camera-extensions/1.4.0-alpha05/camera-extensions-1.4.0-alpha05.aar"],
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
Expand All @@ -119,7 +123,7 @@ android_library {
"//apex_available:platform",
"//apex_available:anyapex",
],
manifest: "androidx/camera/camera-extensions/1.4.0-alpha04/AndroidManifest.xml",
manifest: "androidx/camera/camera-extensions/1.4.0-alpha05/AndroidManifest.xml",
static_libs: [
"Aperture_androidx.camera_camera-extensions-nodeps",
"Aperture_androidx.camera_camera-core",
Expand All @@ -133,7 +137,7 @@ android_library {

android_library_import {
name: "Aperture_androidx.camera_camera-lifecycle-nodeps",
aars: ["androidx/camera/camera-lifecycle/1.4.0-alpha04/camera-lifecycle-1.4.0-alpha04.aar"],
aars: ["androidx/camera/camera-lifecycle/1.4.0-alpha05/camera-lifecycle-1.4.0-alpha05.aar"],
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
Expand All @@ -144,9 +148,11 @@ android_library_import {
"Aperture_androidx.camera_camera-core",
"Aperture_androidx.lifecycle_lifecycle-common",
"androidx.concurrent_concurrent-futures",
"androidx.concurrent_concurrent-futures-ktx",
"androidx.core_core",
"auto_value_annotations",
"guava",
"kotlinx-coroutines-android",
],
}

Expand All @@ -158,22 +164,24 @@ android_library {
"//apex_available:platform",
"//apex_available:anyapex",
],
manifest: "androidx/camera/camera-lifecycle/1.4.0-alpha04/AndroidManifest.xml",
manifest: "androidx/camera/camera-lifecycle/1.4.0-alpha05/AndroidManifest.xml",
static_libs: [
"Aperture_androidx.camera_camera-lifecycle-nodeps",
"Aperture_androidx.camera_camera-core",
"Aperture_androidx.lifecycle_lifecycle-common",
"androidx.concurrent_concurrent-futures",
"androidx.concurrent_concurrent-futures-ktx",
"androidx.core_core",
"auto_value_annotations",
"guava",
"kotlinx-coroutines-android",
],
java_version: "1.7",
}

android_library_import {
name: "Aperture_androidx.camera_camera-video-nodeps",
aars: ["androidx/camera/camera-video/1.4.0-alpha04/camera-video-1.4.0-alpha04.aar"],
aars: ["androidx/camera/camera-video/1.4.0-alpha05/camera-video-1.4.0-alpha05.aar"],
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
Expand All @@ -197,7 +205,7 @@ android_library {
"//apex_available:platform",
"//apex_available:anyapex",
],
manifest: "androidx/camera/camera-video/1.4.0-alpha04/AndroidManifest.xml",
manifest: "androidx/camera/camera-video/1.4.0-alpha05/AndroidManifest.xml",
static_libs: [
"Aperture_androidx.camera_camera-video-nodeps",
"Aperture_androidx.camera_camera-core",
Expand All @@ -211,7 +219,7 @@ android_library {

android_library_import {
name: "Aperture_androidx.camera_camera-view-nodeps",
aars: ["androidx/camera/camera-view/1.4.0-alpha04/camera-view-1.4.0-alpha04.aar"],
aars: ["androidx/camera/camera-view/1.4.0-alpha05/camera-view-1.4.0-alpha05.aar"],
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
Expand All @@ -222,6 +230,7 @@ android_library_import {
"Aperture_androidx.camera_camera-core",
"Aperture_androidx.camera_camera-lifecycle",
"Aperture_androidx.camera_camera-video",
"Aperture_androidx.camera_camera-viewfinder-core",
"Aperture_androidx.lifecycle_lifecycle-common",
"androidx.annotation_annotation",
"androidx.annotation_annotation-experimental",
Expand All @@ -241,12 +250,13 @@ android_library {
"//apex_available:platform",
"//apex_available:anyapex",
],
manifest: "androidx/camera/camera-view/1.4.0-alpha04/AndroidManifest.xml",
manifest: "androidx/camera/camera-view/1.4.0-alpha05/AndroidManifest.xml",
static_libs: [
"Aperture_androidx.camera_camera-view-nodeps",
"Aperture_androidx.camera_camera-core",
"Aperture_androidx.camera_camera-lifecycle",
"Aperture_androidx.camera_camera-video",
"Aperture_androidx.camera_camera-viewfinder-core",
"Aperture_androidx.lifecycle_lifecycle-common",
"androidx.annotation_annotation",
"androidx.annotation_annotation-experimental",
Expand All @@ -259,6 +269,56 @@ android_library {
java_version: "1.7",
}

android_library_import {
name: "Aperture_androidx.camera_camera-viewfinder-core-nodeps",
aars: ["androidx/camera/camera-viewfinder-core/1.4.0-alpha05/camera-viewfinder-core-1.4.0-alpha05.aar"],
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
static_libs: [
"androidx.annotation_annotation",
"androidx.annotation_annotation-experimental",
"androidx.appcompat_appcompat",
"androidx.concurrent_concurrent-futures",
"androidx.concurrent_concurrent-futures-ktx",
"androidx.core_core",
"androidx.test.espresso.idling-resource",
"auto_value_annotations",
"guava",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
],
}

android_library {
name: "Aperture_androidx.camera_camera-viewfinder-core",
sdk_version: "34",
min_sdk_version: "14",
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
manifest: "androidx/camera/camera-viewfinder-core/1.4.0-alpha05/AndroidManifest.xml",
static_libs: [
"Aperture_androidx.camera_camera-viewfinder-core-nodeps",
"androidx.annotation_annotation",
"androidx.annotation_annotation-experimental",
"androidx.appcompat_appcompat",
"androidx.concurrent_concurrent-futures",
"androidx.concurrent_concurrent-futures-ktx",
"androidx.core_core",
"androidx.test.espresso.idling-resource",
"auto_value_annotations",
"guava",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
],
java_version: "1.7",
}

java_import {
name: "Aperture_androidx.lifecycle_lifecycle-common-nodeps",
jars: ["androidx/lifecycle/lifecycle-common/2.6.2/lifecycle-common-2.6.2.jar"],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidx.camera.viewfinder.core" >

<uses-sdk android:minSdkVersion="19" />

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023-2024 The Android Open Source Project

SPDX-License-Identifier: Apache-2.0
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2023-2024 The Android Open Source Project

SPDX-License-Identifier: Apache-2.0
11 changes: 10 additions & 1 deletion app/src/main/java/org/lineageos/aperture/ApertureApplication.kt
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
/*
* SPDX-FileCopyrightText: 2023 The LineageOS Project
* SPDX-FileCopyrightText: 2023-2024 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/

package org.lineageos.aperture

import android.annotation.SuppressLint
import android.app.Application
import androidx.camera.camera2.internal.CameraIdUtil
import com.google.android.material.color.DynamicColors
import org.lineageos.aperture.ext.getStringArray

class ApertureApplication : Application() {
@SuppressLint("RestrictedApi")
override fun onCreate() {
super.onCreate()

// Observe dynamic colors changes
DynamicColors.applyToActivitiesIfAvailable(this)

// Set backward compatible camera ids
CameraIdUtil.setBackwardCompatibleCameraIds(
resources.getStringArray(this, R.array.config_backwardCompatibleCameraIds).asList()
)
}
}
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 The LineageOS Project
* SPDX-FileCopyrightText: 2022-2024 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -13,7 +13,7 @@ pluginManagement {
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven("https://raw.githubusercontent.com/lineage-next/camerax-aperture/c8fdd97d7a0a080cb520acd7855717b9f60cec1f/.m2")
maven("https://raw.githubusercontent.com/lineage-next/camerax-aperture/2f3d84611740152a503b606584c93d64dba4ebcd/.m2")
google()
mavenCentral()
}
Expand Down

0 comments on commit 262ef2e

Please sign in to comment.