2025-09-10 15:35:07 +08:00
|
|
|
group 'com.example.ai_chat_assistant'
|
|
|
|
|
version '1.0-SNAPSHOT'
|
|
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
|
ext.kotlin_version = '2.1.20'
|
|
|
|
|
repositories {
|
2025-09-10 17:33:26 +08:00
|
|
|
maven { url file("mavenLocal") }
|
2025-09-10 15:35:07 +08:00
|
|
|
google()
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
classpath 'com.android.tools.build:gradle:8.11.1'
|
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
|
repositories {
|
2025-09-10 17:33:26 +08:00
|
|
|
maven { url file("mavenLocal") }
|
2025-09-10 15:35:07 +08:00
|
|
|
google()
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
namespace 'com.example.ai_chat_assistant'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
compileSdk 33
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
jvmTarget = "17"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
|
|
|
test.java.srcDirs += 'src/test/kotlin'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
2025-09-17 15:09:05 +08:00
|
|
|
minSdkVersion 21
|
2025-09-10 15:35:07 +08:00
|
|
|
ndk {
|
|
|
|
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
dataBinding true
|
|
|
|
|
viewBinding = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取配置文件
|
|
|
|
|
def localProperties = new Properties()
|
|
|
|
|
def localPropertiesFile = rootProject.file('local.properties')
|
|
|
|
|
if (localPropertiesFile.exists()) {
|
|
|
|
|
localPropertiesFile.withReader('UTF-8') {
|
|
|
|
|
localProperties.load(it)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取flutter sdk 路径
|
|
|
|
|
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
|
|
|
|
if (flutterRoot == null) {
|
|
|
|
|
throw new GradleException("Flutter SDK not found. Define location with flutter.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
repositories {
|
2025-09-17 15:09:05 +08:00
|
|
|
flatDir {
|
|
|
|
|
dirs("libs")
|
|
|
|
|
}
|
2025-09-10 15:35:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2025-09-10 17:33:26 +08:00
|
|
|
implementation 'com.alibaba.idst:nui-release:1.0.0'
|
|
|
|
|
implementation 'com.alibaba:fastjson:1.2.83'
|
2025-09-10 15:35:07 +08:00
|
|
|
// compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm/flutter.jar")
|
2025-09-10 17:33:26 +08:00
|
|
|
// implementation(files("libs/fastjson-1.1.46.android.jar"))
|
2025-09-17 15:09:05 +08:00
|
|
|
// implementation(files("libs/nui-release-1.0.0.aar"))
|
2025-09-10 15:35:07 +08:00
|
|
|
}
|
|
|
|
|
}
|