Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "org.jetbrains.kotlin.android"


android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdk 33
buildToolsVersion = '33.0.1'

defaultConfig {
applicationId "ru.semper_viventem.pixel4scanner"
minSdkVersion 29
targetSdkVersion 29
minSdk 33
targetSdk 33
versionCode 1
versionName "1.0"

Expand All @@ -23,15 +24,16 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
namespace 'ru.semper_viventem.pixel4scanner'
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation("com.google.guava:guava:29.0-jre")
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation('com.google.guava:guava:31.1-jre')
}
11 changes: 6 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.semper_viventem.pixel4scanner">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
Expand All @@ -15,7 +16,7 @@
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:screenOrientation="fullSensor"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -25,7 +26,7 @@

<activity
android:name=".LicenseActivity"
android:screenOrientation="portrait"
android:screenOrientation="fullSensor"
android:theme="@style/Theme.AppCompat.NoActionBar" />

<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.ImageFormat;
import android.graphics.Matrix;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraAccessException;
Expand Down Expand Up @@ -234,8 +235,8 @@ public void createCameraPreview() {
FrameReader newInstance = FrameReader.newInstance(DefaultRenderConfiguration.IMAGE_WIDTH, DefaultRenderConfiguration.IMAGE_HEIGHT, DefaultRenderConfiguration.IMAGE_WIDTH, DefaultRenderConfiguration.IMAGE_HEIGHT, numBufferedFrames);
this.frameReader = newInstance;
newInstance.setOnFrameAvailableListener(this::onFrameAvailable);
this.rgbImageReader = ImageReader.newInstance(DefaultRenderConfiguration.IMAGE_WIDTH, DefaultRenderConfiguration.IMAGE_HEIGHT, 35, numBufferedImages);
this.depthImageReader = ImageReader.newInstance(DefaultRenderConfiguration.IMAGE_WIDTH, DefaultRenderConfiguration.IMAGE_HEIGHT, 1144402265, numBufferedImages);
this.rgbImageReader = ImageReader.newInstance(DefaultRenderConfiguration.IMAGE_WIDTH, DefaultRenderConfiguration.IMAGE_HEIGHT, ImageFormat.YUV_420_888, numBufferedImages);
this.depthImageReader = ImageReader.newInstance(DefaultRenderConfiguration.IMAGE_WIDTH, DefaultRenderConfiguration.IMAGE_HEIGHT, ImageFormat.DEPTH16, numBufferedImages);
this.rgbImageReader.setOnImageAvailableListener(this::onRgbImageAvilable, this.backgroundHandler);
this.depthImageReader.setOnImageAvailableListener(this::onDepthImageAvilable, this.backgroundHandler);
SurfaceTexture cameraTexture = this.cameraView.getSurfaceTexture();
Expand Down
26 changes: 13 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.


buildscript {
ext.kotlin_version = "1.4.10"
ext {
kotlin_version = "1.8.10"
}

repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath ("com.android.tools.build:gradle:8.1.0-alpha07")
classpath ("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}




5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Oct 15 22:14:35 MSK 2020
#Tue Feb 28 23:23:50 GMT-05:00 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Loading