File size: 5,992 Bytes
f5f56a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
/*
* Copyright 2025 Google LLC
*
* 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.
*/
plugins {
alias(libs.plugins.android.application)
// Note: set apply to true to enable google-services (requires google-services.json).
alias(libs.plugins.google.services) apply false
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.protobuf)
alias(libs.plugins.hilt.application)
alias(libs.plugins.oss.licenses)
kotlin("kapt")
}
android {
// AGP 8+ ์์ assets ์์ถ ๊ธ์ง
// androidResources { noCompress += "tflite" }
namespace = "com.google.ai.edge.gallery"
compileSdk = 35
defaultConfig {
applicationId = "com.google.aiedge.gallery"
minSdk = 31
targetSdk = 35
versionCode = 13
versionName = "1.0.7"
// Needed for HuggingFace auth workflows.
// Use the scheme of the "Redirect URLs" in HuggingFace app.
manifestPlaceholders["appAuthRedirectScheme"] =
"REPLACE_WITH_YOUR_REDIRECT_SCHEME_IN_HUGGINGFACE_APP"
manifestPlaceholders["applicationName"] = "com.google.ai.edge.gallery.GalleryApplication"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// for RAG
// assets ๊ฒฝ๋ก (์์ผ๋ฉด ์ถ๊ฐ)
sourceSets["main"].assets.srcDirs("src/main/assets")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs.getByName("debug")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs += "-Xcontext-receivers"
}
buildFeatures {
compose = true
buildConfig = true
}
// ๊ณ ์ฐ
androidResources {
// ๐ก TFLite ๋ชจ๋ธ๊ณผ NPY ํ์ผ์ด ์์ถ๋์ง ์๋๋ก ์ถ๊ฐํฉ๋๋ค.
noCompress += listOf("tflite", "npy", "bin")
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
implementation(libs.androidx.compose.navigation)
implementation(libs.kotlinx.serialization.json)
implementation(libs.material.icon.extended)
implementation(libs.androidx.work.runtime)
implementation(libs.androidx.datastore)
implementation(libs.com.google.code.gson)
implementation(libs.androidx.lifecycle.process)
implementation(libs.androidx.security.crypto)
implementation(libs.mediapipe.tasks.text)
implementation(libs.mediapipe.tasks.genai)
// implementation("org.tensorflow:tensorflow-lite:2.14.0")
// implementation("org.tensorflow:tensorflow-lite-support:0.4.4")
implementation(libs.commonmark)
implementation(libs.richtext)
implementation(libs.tflite)
implementation(libs.tflite.gpu)
implementation(libs.tflite.support)
implementation(libs.camerax.core)
implementation(libs.camerax.camera2)
implementation(libs.camerax.lifecycle)
implementation(libs.camerax.view)
implementation(libs.openid.appauth)
implementation(libs.androidx.splashscreen)
implementation(libs.protobuf.javalite)
implementation(libs.hilt.android)
implementation(libs.hilt.navigation.compose)
implementation(libs.play.services.oss.licenses)
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
implementation(libs.androidx.exifinterface)
kapt(libs.hilt.android.compiler)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
androidTestImplementation(libs.hilt.android.testing)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
// AI Edge RAG SDK (์จ๋๋ฐ์ด์ค ์๋ฒ ๋/์ฒด์ธ ๋ฑ)
implementation("com.google.ai.edge.localagents:localagents-rag:0.1.0")
implementation("com.google.mediapipe:tasks-genai:0.10.22")
implementation("com.google.mediapipe:tasks-vision:0.10.26.1")
implementation("org.tensorflow:tensorflow-lite:2.14.0")
implementation("org.tensorflow:tensorflow-lite-gpu:2.14.0")
implementation("org.tensorflow:tensorflow-lite-support:0.4.4")
//๊ต์ฐ
implementation("androidx.exifinterface:exifinterface:1.3.7")
implementation("com.google.code.gson:gson:2.10.1") // Gson (JSON ํ์ฑ์ฉ)
//for tts
implementation("com.google.mlkit:text-recognition-korean:16.0.1")
//์์ค
implementation(project(":unityLibrary"))
// 2. fileTree ๋ถ๋ถ๋ Kotlin ๋ฌธ๋ฒ์ ๋ง๊ฒ ์์
implementation(fileTree(File(rootDir, "unityLibrary/libs")) {
include("*.jar")
})
// for chat panel ani
implementation("androidx.compose.animation:animation-graphics:<compose-version>")
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:4.26.1" }
generateProtoTasks { all().forEach { it.plugins { create("java") { option("lite") } } } }
}
|