//获取local.properties配置文件 def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } //获取flutter的sdk路径 def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm/flutter.jar") compileOnly 'androidx.annotation:annotation:1.1.0' }
版权声明:本文为qq_35589019原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。