|
@@ -0,0 +1,80 @@
|
|
|
|
|
+apply plugin: 'com.android.library'
|
|
|
|
|
+
|
|
|
|
|
+android {
|
|
|
|
|
+ compileSdkVersion versions.compileSdk
|
|
|
|
|
+ buildToolsVersion versions.buildTools
|
|
|
|
|
+
|
|
|
|
|
+ defaultConfig {
|
|
|
|
|
+ minSdkVersion versions.minSdk
|
|
|
|
|
+ targetSdkVersion versions.targetSdk
|
|
|
|
|
+ versionCode 1
|
|
|
|
|
+ versionName "1.0"
|
|
|
|
|
+
|
|
|
|
|
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
|
+ consumerProguardFiles 'consumer-rules.pro'
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ buildTypes {
|
|
|
|
|
+ release {
|
|
|
|
|
+ minifyEnabled false
|
|
|
|
|
+ buildConfigField("boolean", "IS_DEBUG_MODE", "false")
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ debug {
|
|
|
|
|
+ minifyEnabled false
|
|
|
|
|
+ buildConfigField("boolean", "IS_DEBUG_MODE", "true")
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 开发与发布的URL
|
|
|
|
|
+ flavorDimensions "url"
|
|
|
|
|
+ productFlavors {
|
|
|
|
|
+ dev {
|
|
|
|
|
+ // 开发环境宿舍服务器
|
|
|
|
|
+ buildConfigField("String", "BASE_URL", '"http://192.168.0.190:8080/"')
|
|
|
|
|
+ buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://192.168.0.190/"')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rel {
|
|
|
|
|
+ // 正式上线
|
|
|
|
|
+ buildConfigField("String", "BASE_URL", '"http://app.icsmabc.cyou:8856/"')
|
|
|
|
|
+ buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://icsmabc.cyou/eden/images/"')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ company {
|
|
|
|
|
+ // 开发2
|
|
|
|
|
+ buildConfigField("String", "BASE_URL", '"http://10.16.0.153:8080/"')
|
|
|
|
|
+ buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://10.16.0.153/"')
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+dependencies {
|
|
|
|
|
+ api project(path: ':mvp')
|
|
|
|
|
+ api project(path: ':common')
|
|
|
|
|
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
|
+
|
|
|
|
|
+ implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
|
|
|
|
|
+ testImplementation 'junit:junit:4.12'
|
|
|
|
|
+ androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
|
|
|
|
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
|
|
|
+
|
|
|
|
|
+ // 使用 retrofit + rx + gson 实现网络请求与解析start---->
|
|
|
|
|
+ // 导入 retrofit
|
|
|
|
|
+ api 'com.squareup.retrofit2:retrofit:2.7.1'
|
|
|
|
|
+ // 导入 rxjava,此处一定要注意使用RxJava2的版本
|
|
|
|
|
+ api "io.reactivex.rxjava2:rxjava:2.2.17"
|
|
|
|
|
+ // 导入 rxandroid
|
|
|
|
|
+ api 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
|
|
|
|
+
|
|
|
|
|
+ // 衔接 retrofit 和 rxjava
|
|
|
|
|
+ api 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
|
|
|
|
|
+ // 衔接 retrofit 和 gson
|
|
|
|
|
+ api 'com.squareup.retrofit2:converter-gson:2.2.0'
|
|
|
|
|
+ // 使用 retrofit + rx + gson 实现网络请求与解析end<-----
|
|
|
|
|
+
|
|
|
|
|
+ // 打印网络请求日志框架
|
|
|
|
|
+ //implementation 'com.orhanobut:logger:2.2.0'
|
|
|
|
|
+
|
|
|
|
|
+ api "com.squareup.okhttp3:logging-interceptor:3.6.0"
|
|
|
|
|
+}
|