| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- group = "com.atmob.keyboard_android"
- version = "1.0-SNAPSHOT"
- // 加载 local.properties 文件
- // 需要在 local.properties 文件中配置你的flutter的sdk目录,例如:flutter.sdk=C\:\\Users\\XM20240809\\fvm\\versions\\3.29.2
- def localProperties = new Properties()
- def localPropertiesFile = rootProject.file('local.properties')
- if (localPropertiesFile.exists()) {
- localPropertiesFile.withInputStream { stream ->
- localProperties.load(stream)
- }
- }
- // 读取变量
- def flutterSdk = localProperties.getProperty('flutter.sdk')
- buildscript {
- ext.kotlin_version = "1.8.22"
- repositories {
- google()
- mavenCentral()
- }
- dependencies {
- classpath("com.android.tools.build:gradle:8.7.0")
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
- }
- }
- allprojects {
- repositories {
- google()
- mavenCentral()
- }
- }
- apply plugin: "com.android.library"
- apply plugin: "kotlin-android"
- android {
- namespace = "com.atmob.keyboard_android"
- compileSdk = 35
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_11
- targetCompatibility = JavaVersion.VERSION_11
- }
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_11
- }
- sourceSets {
- main.java.srcDirs += "src/main/kotlin"
- test.java.srcDirs += "src/test/kotlin"
- }
- defaultConfig {
- minSdk = 21
- }
- dependencies {
- testImplementation("org.jetbrains.kotlin:kotlin-test")
- testImplementation("org.mockito:mockito-core:5.0.0")
- compileOnly(files("$flutterSdk/bin/cache/artifacts/engine/android-arm/flutter.jar"))
- }
- testOptions {
- unitTests.all {
- useJUnitPlatform()
- testLogging {
- events "passed", "skipped", "failed", "standardOut", "standardError"
- outputs.upToDateWhen {false}
- showStandardStreams = true
- }
- }
- }
- }
|