blob: 60d78300678410716bf655e7e1cc4f60272d1226 [file] [log] [blame]
apply plugin: 'com.android.library'
apply plugin: 'com.google.protobuf'
android {
compileSdkVersion 31
lintOptions {
abortOnError false
}
defaultConfig {
// #gles3 #vulkan - You can reduce minSdkVersion down to 16 depending
// on rendering APIs supported:
//
// OpenGL ES 2.0 - Requires 16 or higher
// OpenGL ES 3.0 - Requires 18 or higher
// Vulkan - Requires 24 or higher
//
// See the release notes for details.
minSdkVersion 24
targetSdkVersion 31
versionCode 1
versionName "1.18.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild.cmake {
arguments "-DANDROID_STL=c++_static"
}
defaultConfig {
consumerProguardFiles 'proguard-rules.pro'
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild.cmake {
path "CMakeLists.txt"
}
sourceSets {
// Sets path to java, jni, resources files and manifest location as it is not the default one.
main {
manifest.srcFile 'qrcode/android/AndroidManifest.xml'
java.srcDirs = ['qrcode/android/java', 'device_params/android/java', 'screen_params/android/java']
jni.srcDirs = ['qrcode/android/jni']
res.srcDirs = ['qrcode/android/res']
}
// Adds proto file and generated source files
main.java.srcDirs += "${protobuf.generatedFilesBaseDir}/main/javalite"
main.proto.srcDirs = ["${project.rootDir}/proto"]
main.proto.includes = ["cardboard_device.proto"]
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.19.4'
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option "lite"
}
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.4.2'
// Android Mobile Vision
// TODO(b/217176538) Migrate to ML Kit.
implementation 'com.google.android.gms:play-services-vision:20.1.3'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.protobuf:protobuf-javalite:3.19.4'
}