-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathbuild.gradle
209 lines (176 loc) · 5.61 KB
/
build.gradle
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'constants.gradle'
buildscript {
repositories {
google()
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.stanfy.spoon:spoon-gradle-plugin:1.2.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
}
}
println "Using Android Native Player version: $anpVersion"
project.ext {
// The directory that will be used to reference dependent libraries.
// Modify as needed. Defaulted to users home directory.
libraryDirectory = "${System.getProperty("user.home")}/libs/"
}
configure(subprojects.findAll {it.name.endsWith('SampleApp')}) {
apply plugin: 'com.android.application'
repositories {
mavenCentral()
mavenLocal()
google()
maven {
url 'https://maven.google.com'
}
maven {
url 'https://repo.brightcove.com/releases'
}
maven {
url System.getenv('ANDROID_HOME') + '/extras/android/m2repository'
}
maven {
url System.getenv('ANDROID_HOME') + '/extras/google/m2repository'
}
// This top level file repository will provide/contain third party
// dependencies which are either downloaded directly (not using a
// Maven repo) or installed manually for something like VisualOn.
flatDir {
dirs libraryDirectory
}
}
android {
compileSdkVersion ANDROID_COMPILE_SDK_VERSION
defaultConfig {
minSdkVersion ANDROID_MIN_SDK_VERSION
targetSdkVersion ANDROID_TARGET_SDK_VERSION
multiDexEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
signingConfigs {
release {
storeFile file("${rootDir}/release.keystore")
storePassword "my_keystore_password"
keyAlias "my_key"
keyPassword "my_password"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), "${rootDir}/proguard-project.txt"
}
}
lintOptions {
warning 'InvalidPackage'
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
dependencies {
implementation "com.brightcove.player:android-sdk:${anpVersion}"
implementation "androidx.multidex:multidex:${MULTIDEX_VERSION}"
}
if (project.name.contains('IMA')) {
dependencies {
implementation "com.brightcove.player:android-ima-plugin:${anpVersion}"
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:'+GOOGLE_IMA_SDK_VERSION
implementation "androidx.legacy:legacy-support-v4:${ANDROIDX_LEGACY_SUPPORT_V4}"
}
}
if (project.name.contains('DAI')) {
dependencies {
implementation "com.brightcove.player:android-dai-plugin:${anpVersion}"
implementation "androidx.legacy:legacy-support-v4:${ANDROIDX_LEGACY_SUPPORT_V4}"
}
}
if (project.name.contains('Omniture')) {
dependencies {
implementation "com.brightcove.player:android-omniture-plugin:${anpVersion}"
implementation files(libraryDirectory + "adobeMobileLibrary.jar")
}
}
if (project.name.contains('OnceUx')) {
dependencies {
implementation "com.brightcove.player:android-onceux-plugin:${anpVersion}"
implementation "com.brightcove.player:exoplayer2:${anpVersion}"
}
}
if (project.name.contains('Ssai') || project.name.contains('SSAI')) {
dependencies {
implementation "com.brightcove.player:android-ssai-plugin:${anpVersion}"
implementation "com.brightcove.player:exoplayer2:${anpVersion}"
implementation "com.brightcove.player:android-thumbnail-plugin:${anpVersion}"
}
}
if (project.name.contains('Thumbnail')) {
dependencies {
implementation "com.brightcove.player:android-thumbnail-plugin:${anpVersion}"
}
}
if (project.name.contains('AudioOnly')) {
dependencies {
implementation "com.brightcove.player:exoplayer2:${anpVersion}"
implementation "com.brightcove.player:android-playback-notification-plugin:${anpVersion}"
}
}
if (project.parent.name == 'brightcove-exoplayer' ||
project.parent.name == 'brightcove-exoplayer-kotlin'||
project.parent.name == 'brightcove-player-controls') {
dependencies {
implementation "com.brightcove.player:exoplayer2:${anpVersion}"
implementation "androidx.media:media:${ANDROIDX_MEDIA}"
}
android {
defaultConfig {
minSdkVersion ANDROID_MIN_SDK_VERSION
}
}
}
if (project.name.contains('WebVTT')) {
android {
defaultConfig {
minSdkVersion ANDROID_MIN_SDK_VERSION
}
}
}
if (project.name.contains('Cast')) {
dependencies {
implementation "com.brightcove.player:android-cast-plugin:${anpVersion}"
}
}
if (project.name.contains('FreeWheel')) {
dependencies {
implementation "com.brightcove.player:android-freewheel-plugin:${anpVersion}"
implementation files(libraryDirectory + "AdManager.aar")
}
}
if (project.name.contains('Pulse')) {
dependencies {
implementation "com.brightcove.player:android-pulse-plugin:${anpVersion}"
implementation files(libraryDirectory + "Pulse.aar")
}
}
if (project.name.contains('Offline')) {
dependencies {
implementation "com.brightcove.player:offline-playback:${anpVersion}"
}
}
println "Processing ${project.name}"
}
repositories {
mavenCentral()
mavenLocal()
google()
}