Files
Test-apk/android/build.gradle

42 lines
1.1 KiB
Groovy

def flutterSdkPath = System.env.FLUTTER_SDK ?: System.properties['flutter.sdk']
buildscript {
ext.kotlin_version = '1.8.22'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
String flutterProjectRoot = rootProject.projectDir.parentFile.toPath().normalize().toString()
File pluginsFile = new File(flutterProjectRoot, '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.text.eachLine { line ->
def pluginDef = line.split('=')
if (pluginDef.length == 2) {
def pluginName = pluginDef[0]
def pluginPath = pluginDef[1]
include ":$pluginName"
project(":$pluginName").projectDir = new File(pluginPath, 'android')
}
}
}