-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathbuild.gradle
More file actions
74 lines (64 loc) · 2.44 KB
/
build.gradle
File metadata and controls
74 lines (64 loc) · 2.44 KB
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
import com.android.builder.model.Version
import com.qiyi.plugin.utils.Utils
apply plugin: 'com.android.application'
apply plugin: 'com.qiyi.neptune.plugin'
// 宿主使用,固定资源id
neptune {
pluginMode = false
packageId = 0x7f
}
android {
compileSdkVersion COMPILE_SDK_VERSION
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
applicationId "com.iqiyi.host.sample"
minSdkVersion 14
targetSdkVersion TARGET_SDK_VERSION
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dexOptions {
//preDexLibraries false
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
android.applicationVariants.all { variant ->
def fileName = defaultConfig.applicationId + ".apk"
variant.outputs.each { output ->
// 修改apk名称
//def fileName = defaultConfig.applicationId + "-" + defaultConfig.versionName + "-" + variant.buildType.name + ".apk"
boolean highAGP = Utils.compareVersion(Version.ANDROID_GRADLE_PLUGIN_VERSION, "3.0.0") >= 0
if (highAGP) {
output.outputFileName = fileName
} else {
def file = output.outputFile
if (file != null && file.name.endsWith(".apk")) {
output.outputFile = new File(file.parent, fileName)
}
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:appcompat-v7:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:support-annotations:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:support-v4:${ANDROID_SUPPORT_VERSION}"
implementation "com.android.support:recyclerview-v7:${ANDROID_SUPPORT_VERSION}"
implementation "com.facebook.fresco:fresco:${FRESCO_VERSION}"
implementation "com.airbnb.android:lottie:${LOTTIE_VERSION}"
implementation "com.jakewharton:butterknife:${BUTTER_KNIFE_VERSION}"
annotationProcessor "com.jakewharton:butterknife-compiler:${BUTTER_KNIFE_VERSION}"
//implementation project(":SdkLibrary")
implementation "org.qiyi.video:neptune:${NEPTUNE_LIBRARY_VERSION}"
}