group 'com.pauldemarco.flutter_blue' version '1.0' def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new Exception("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' } buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.1.0' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.15' } } rootProject.allprojects { repositories { google() jcenter() } } apply plugin: 'com.android.library' apply plugin: 'com.google.protobuf' android { compileSdkVersion 30 defaultConfig { minSdkVersion 19 } sourceSets { main { proto { srcDir '../protos' } } } } protobuf { protoc { artifact = 'com.google.protobuf:protoc:3.11.4' } generateProtoTasks { all().each { task -> task.builtins { java { option "lite" } } } } } dependencies { implementation 'com.google.protobuf:protobuf-javalite:3.11.4' compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm64/flutter.jar") compileOnly "androidx.annotation:annotation:1.1.0" compileOnly "androidx.appcompat:appcompat:1.3.0" }