Skip to content

Commit

Permalink
Added builds without sign. (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
jankejc committed Jun 21, 2023
1 parent 8a18265 commit 911e6e7
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 0 deletions.
143 changes: 143 additions & 0 deletions Android/PolishBanknotesApp/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* The project is based on https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android
* on above license. Every change has been made or approved by me (https://github.com/jankejc).
*/

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'androidx.navigation.safeargs'
id 'de.undercouch.download'
}

android {
compileSdk 33
namespace 'pg.eti.project.polishbanknotes'

defaultConfig {
applicationId "pg.eti.project.polishbanknotes"
minSdk 24
// Must be the same as compileSdk
targetSdk 33
versionCode 4
versionName "1.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

flavorDimensions "development"
productFlavors {
dev {
dimension "development"
}

client {
dimension "development"
}
}

buildTypes {
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

buildFeatures {
viewBinding true
mlModelBinding true
}

androidResources {
noCompress 'tflite'
}

lintOptions {
abortOnError false
check 'NewApi'
}
}

// import DownloadModels task
//project.ext.ASSET_DIR = projectDir.toString() + '/src/main/assets'
//project.ext.TEST_ASSETS_DIR = projectDir.toString() + '/src/androidTest/assets'

// Download default models; if you wish to use your own models then
// place them in the "assets" directory and comment out this line.
//apply from: 'download_models.gradle'

dependencies {

// Kotlin lang
implementation 'androidx.core:core-ktx:1.8.0'

// App compat and UI things
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
//implementation 'org.tensorflow:tensorflow-lite-support:0.1.0'
implementation 'org.tensorflow:tensorflow-lite-metadata:0.1.0'
implementation 'androidx.preference:preference:1.1.+'

// Navigation library
def nav_version = "2.4.2"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

// CameraX core library
def camerax_version = '1.2.0-alpha02'
implementation "androidx.camera:camera-core:$camerax_version"

// CameraX Camera2 extensions
implementation "androidx.camera:camera-camera2:$camerax_version"

// CameraX Lifecycle library
implementation "androidx.camera:camera-lifecycle:$camerax_version"

// CameraX View class
implementation "androidx.camera:camera-view:$camerax_version"

//WindowManager
implementation 'androidx.window:window:1.1.0-alpha02'

// Unit testing
testImplementation 'junit:junit:4.13.2'

// Instrumented testing
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation 'org.tensorflow:tensorflow-lite-task-vision:0.4.0'
// Import the GPU delegate plugin Library for GPU inference
implementation 'org.tensorflow:tensorflow-lite-gpu-delegate-plugin:0.4.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.9.0'

// Settings addons
implementation 'com.jaredrummler:colorpicker:1.1.0'
}
16 changes: 16 additions & 0 deletions Android/PolishBanknotesApp/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
dependencies {
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.4.2'
classpath 'de.undercouch:gradle-download-task:4.1.2'
}
}
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
}

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

0 comments on commit 911e6e7

Please sign in to comment.