-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathcomponent_basic.gradle
More file actions
115 lines (107 loc) · 4.13 KB
/
component_basic.gradle
File metadata and controls
115 lines (107 loc) · 4.13 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
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
apply from: rootProject.file('cc-settings-2.gradle')
/** phantom框架宿主 gradle 插件使用 */
apply plugin: 'com.wlqq.phantom.host'
//apply from: 'https://raw.githubusercontent.com/luckybilly/CC/master/cc-settings.gradle'
//先加载local.properties文件
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
Properties localProperties = new Properties()
try {
def localFile = project.rootProject.file('local.properties')
if (localFile != null && localFile.exists()) {
localProperties.load(localFile.newDataInputStream())
}
} catch (Exception ignored) {
println("local.properties not found")
}
//runAsApp = ('true' == localProperties.getProperty(project.name))
//模块名称
def componentName = project.name.replaceAll("component_", "")
println(project.name + "--" + project.ext.runAsApp)
android {
compileSdkVersion build_versions.target_sdk
buildToolsVersion build_versions.build_tools
defaultConfig {
minSdkVersion build_versions.min_sdk
targetSdkVersion build_versions.target_sdk
versionCode build_versions.versionCode
versionName build_versions.versionName
if (project.ext.runAsApp) {
applicationId deps.buildApplicationId + componentName
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
resourcePrefix componentName + "_"
resValue "string", componentName + "_module_name", project.name
signingConfigs {
config {
keyAlias localProperties['keyAlias']
keyPassword localProperties['keyPassword']
storeFile file(new File(rootDir.getAbsolutePath() + localProperties['storeFile']))
storePassword localProperties['storePassword']
// v2SigningEnabled false
}
}
vectorDrawables.useSupportLibrary = true
ndk {
//选择要添加的对应cpu类型的.so库。
abiFilters 'armeabi-v7a'
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64', armeabi'armeabi-v7a'
}
}
buildTypes {
release {
signingConfig signingConfigs.config
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.config
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation deps.support.v4
implementation deps.support.app_compat
implementation deps.support.design
implementation deps.support.cardview
implementation deps.preference.preference
implementation deps.constraint_layout
// //Paging的依赖
// implementation deps.paging
implementation deps.kotlin.stdlib
implementation deps.retrofit.runtime
implementation deps.retrofit.gson
// implementation deps.alibaba.fastjson
implementation deps.retrofit.rxjava2
implementation deps.okhttp_logging_interceptor
implementation deps.rx_android
implementation deps.rxjava2
implementation deps.rxbinding
implementation deps.klinkerapps
// implementation deps.rxbinding_core
// implementation deps.rxbinding_appcompat
// implementation deps.rxbinding_drawerlayout
// implementation deps.rxbinding_leanback
// implementation deps.rxbinding_recyclerview
// implementation deps.rxbinding_slidingpanelayout
// implementation deps.rxbinding_swiperefreshlayout
// implementation deps.rxbinding_viewpager
// implementation deps.rxbinding_material
implementation deps.phantomVersion.hostLib
implementation deps.phantomVersion.communicationLib
testImplementation deps.junit
androidTestImplementation deps.atsl.runner
androidTestImplementation deps.espresso.core
}