Blame view

packages/video_player_android/android/build.gradle 2.38 KB
d2b3433a   吴启风   fix: 修复部分安卓设备视频持续加载
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  group 'io.flutter.plugins.videoplayer'
  version '1.0-SNAPSHOT'
  
  buildscript {
      repositories {
          google()
          mavenCentral()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:8.5.0'
      }
  }
  
  rootProject.allprojects {
      repositories {
          google()
          mavenCentral()
      }
  }
  
  apply plugin: 'com.android.library'
  
  android {
      namespace 'io.flutter.plugins.videoplayer'
      compileSdk = flutter.compileSdkVersion
  
      defaultConfig {
          minSdkVersion 21
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
      lintOptions {
          checkAllWarnings true
          warningsAsErrors true
          disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable'
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_11
          targetCompatibility JavaVersion.VERSION_11
      }
  
      dependencies {
          def exoplayer_version = "1.4.1"
          implementation "androidx.media3:media3-exoplayer:${exoplayer_version}"
          implementation "androidx.media3:media3-exoplayer-hls:${exoplayer_version}"
          implementation "androidx.media3:media3-exoplayer-dash:${exoplayer_version}"
          implementation "androidx.media3:media3-exoplayer-rtsp:${exoplayer_version}"
          implementation "androidx.media3:media3-exoplayer-smoothstreaming:${exoplayer_version}"
          testImplementation 'junit:junit:4.13.2'
          testImplementation 'androidx.test:core:1.6.1'
          testImplementation 'org.mockito:mockito-inline:5.2.0'
          testImplementation 'org.robolectric:robolectric:4.14.1'
          testImplementation "androidx.media3:media3-test-utils:${exoplayer_version}"
      }
  
      testOptions {
          unitTests.includeAndroidResources = true
          unitTests.returnDefaultValues = true
          unitTests.all {
              // The org.gradle.jvmargs property that may be set in gradle.properties does not impact
              // the Java heap size when running the Android unit tests. The following property here
              // sets the heap size to a size large enough to run the robolectric tests across
              // multiple SDK levels.
              jvmArgs "-Xmx4G"
              testLogging {
                 events "passed", "skipped", "failed", "standardOut", "standardError"
                 outputs.upToDateWhen {false}
                 showStandardStreams = true
              }
          }
      }
  }