build.gradle 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. group 'com.isvisoft.flutter_screen_recording'
  2. version '1.0-SNAPSHOT'
  3. def localProperties = new Properties()
  4. def localPropertiesFile = rootProject.file('local.properties')
  5. if (localPropertiesFile.exists()) {
  6. localPropertiesFile.withReader('UTF-8') { reader ->
  7. localProperties.load(reader)
  8. }
  9. }
  10. def flutterRoot = localProperties.getProperty('flutter.sdk')
  11. if (flutterRoot == null) {
  12. throw new Exception("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  13. }
  14. def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  15. if (flutterVersionCode == null) {
  16. flutterVersionCode = '1'
  17. }
  18. def flutterVersionName = localProperties.getProperty('flutter.versionName')
  19. if (flutterVersionName == null) {
  20. flutterVersionName = '1.0'
  21. }
  22. buildscript {
  23. ext.kotlin_version = '1.3.61'
  24. repositories {
  25. google()
  26. jcenter()
  27. maven { url 'https://jitpack.io' }
  28. }
  29. dependencies {
  30. classpath 'com.android.tools.build:gradle:3.5.3'
  31. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  32. }
  33. }
  34. rootProject.allprojects {
  35. repositories {
  36. google()
  37. jcenter()
  38. maven { url 'https://jitpack.io' }
  39. }
  40. }
  41. apply plugin: 'com.android.library'
  42. apply plugin: 'kotlin-android'
  43. android {
  44. compileSdkVersion 28
  45. sourceSets {
  46. main.java.srcDirs += 'src/main/kotlin'
  47. }
  48. defaultConfig {
  49. minSdkVersion 21
  50. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  51. }
  52. lintOptions {
  53. disable 'InvalidPackage'
  54. }
  55. compileOptions {
  56. targetCompatibility JavaVersion.VERSION_1_8
  57. }
  58. android {
  59. kotlinOptions {
  60. jvmTarget = '1.8'
  61. }
  62. }
  63. }
  64. dependencies {
  65. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  66. implementation 'com.github.HBiSoft:HBRecorder:2.0.4'
  67. compileOnly files("$flutterRoot/bin/cache/artifacts/engine/android-arm64/flutter.jar")
  68. implementation "androidx.annotation:annotation:1.1.0"
  69. }