253 lines
		
	
	
		
			15 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			253 lines
		
	
	
		
			15 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| apply plugin: 'com.android.application'
 | |
| //apply plugin: 'com.jakewharton.butterknife'
 | |
| // apply plugin: 'com.neenbedankt.android-apt'
 | |
| android {
 | |
|     signingConfigs {
 | |
|         releaseConfig {
 | |
|             keyAlias 'key0'
 | |
|             keyPassword 'hello123'
 | |
|             storeFile file('E:/reading/android/asProjects/mykeystore.jks')
 | |
|             storePassword 'hello123'
 | |
|         }
 | |
|     }
 | |
|     compileSdkVersion 28
 | |
|     buildToolsVersion "28.0.3"
 | |
|     defaultConfig {
 | |
|       //  applicationId "com.qq.e.union.demo"
 | |
|         applicationId "com.novelbook.android"
 | |
|         minSdkVersion 19  //target 19 Android 4.4 以下版本仅占比4.1%
 | |
|         targetSdkVersion 28
 | |
|         versionCode 6
 | |
|         versionName "v6.0"
 | |
| 
 | |
|         //  testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 | |
| 
 | |
|         // vectorDrawables.useSupportLibrary = true
 | |
| 
 | |
| 
 | |
|         vectorDrawables.useSupportLibrary = true
 | |
| 
 | |
|         renderscriptTargetApi 24                  //blurkit
 | |
|         renderscriptSupportModeEnabled true     //blurkit
 | |
| 
 | |
|         multiDexEnabled true    //突破65535
 | |
|         manifestPlaceholders = [UMENG_CHANNEL_CALUE: "umeng"]       //默认为uMeng
 | |
|         manifestPlaceholders = [MOBAPPID: "ca-app-pub-7589200066914535~9227821515"]
 | |
|         flavorDimensions "default"  //debug时注销
 | |
|     }
 | |
|     buildTypes {
 | |
|         debug {
 | |
|             // 显示Log
 | |
|             buildConfigField "boolean", "LOG_DEBUG", "true"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://dg.xiaoshuofenxiang.com/api/"'
 | |
|         //   buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/dg.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/d.p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\//d.r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\//d.s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\//d.n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\//d.nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\//d.u.xiaoshuofenxiang.com\\"]}"'
 | |
|            buildConfigField "String", "API_HOST", '""'
 | |
| 
 | |
|             // buildConfigField "String", "CHANNEL",'"DEBUG"'
 | |
|             versionNameSuffix "-debug"
 | |
|             minifyEnabled false
 | |
|             zipAlignEnabled false
 | |
|             shrinkResources false
 | |
|             signingConfig signingConfigs.debug
 | |
|         }
 | |
|        release {
 | |
|             // 暂时显示Log 。。。。。。。。。。。。。。。上线时关闭
 | |
|             buildConfigField "boolean", "LOG_DEBUG", "true"
 | |
|             //混淆
 | |
|             minifyEnabled true
 | |
|             //Zipalign优化
 | |
|             zipAlignEnabled true
 | |
|             // 移除无用的resource文件
 | |
|             shrinkResources true
 | |
|             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
 | |
|           // versionCode 1
 | |
|         //   versionName "v1.0"
 | |
|          /* applicationVariants.all { variant ->
 | |
|                 variant.outputs.all { output ->
 | |
|                     def outFile = output.outputFile
 | |
|                     if (outFile != null && outFile.name.endsWith(".apk")) {
 | |
|                         def fileName = "${defaultConfig.versionName}-" + "${releaseTime()}" + "-${variant.productFlavors[0].name}" + ".apk"
 | |
| 
 | |
|                         outputFileName = fileName;
 | |
|                     }
 | |
|                 }
 | |
| 
 | |
|             }*/
 | |
|             signingConfig signingConfigs.releaseConfig
 | |
|         }
 | |
|     }
 | |
|     //渠道
 | |
|  /*  productFlavors {
 | |
|         // googleplay {}
 | |
|        huawei {
 | |
|            applicationId "com.zhushou.yueshu"
 | |
|            versionName "v1.0"
 | |
|            buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|            buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
|        }
 | |
|        google {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
|        }
 | |
|         ali {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
| 
 | |
|         }
 | |
|         qq {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
|             //buildConfigField "String", "API_HOST", '""'
 | |
| 
 | |
|         }
 | |
| 
 | |
|         xiaomi {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
|         }
 | |
| 
 | |
| 
 | |
|              kuan {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
|         }
 | |
|         m360 {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
|         }
 | |
|         baidu {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
|         }
 | |
|         m91 {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
|         }
 | |
|         anzhi {
 | |
|             applicationId "com.zhushou.yueshu"
 | |
|             versionName "v1.0"
 | |
|             buildConfigField "String", "MAIN_HOST", '"http://g.xiaoshuofenxiang.com/api/"'
 | |
|             buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
| 
 | |
|         }
 | |
|           wzzw {
 | |
|               applicationId "com.novelbook.android.wzzw"
 | |
|               versionName "v-wzzw-5.0"
 | |
|               buildConfigField "String", "MAIN_HOST", '"http://chwzzw.xiaoshuofenxiang.com/api/"'
 | |
|               buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/wzzw.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
|               // buildConfigField "String", "API_HOST", '""'
 | |
|           }
 | |
|           bo {
 | |
|               applicationId "com.novelbook.android.bo"
 | |
|               versionName "v-bo-5.0"
 | |
|               buildConfigField "String", "MAIN_HOST", '"http://chbo.xiaoshuofenxiang.com/api/"'
 | |
|               buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/bo.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
|               // buildConfigField "String", "API_HOST", '""'
 | |
|           }
 | |
|           g {
 | |
|               applicationId "com.novelbook.android.g"
 | |
|               versionName "v-g-5.0"
 | |
|               buildConfigField "String", "MAIN_HOST", '"http://chg.xiaoshuofenxiang.com/api/"'
 | |
|               buildConfigField "String", "API_HOST", '"{\\"master\\":[\\"http:\\\\/\\\\/g.xiaoshuofenxiang.com\\"],\\"page\\":[\\"http:\\\\/\\\\/p.xiaoshuofenxiang.com\\"],\\"report\\":[\\"http:\\\\/\\\\/r.xiaoshuofenxiang.com\\"],\\"search\\":[\\"http:\\\\/\\\\/s.xiaoshuofenxiang.com\\"],\\"novel\\":[\\"http:\\\\/\\\\/n.xiaoshuofenxiang.com\\"],\\"novelsbydot\\":[\\"http:\\\\/\\\\/nbd.xiaoshuofenxiang.com\\"],\\"user\\":[\\"http:\\\\/\\\\/u.xiaoshuofenxiang.com\\"]}"'
 | |
|               // buildConfigField "String", "API_HOST", '""'
 | |
|           }
 | |
|         //批量配置
 | |
|         productFlavors.all { flavor ->
 | |
|             flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
 | |
|         }
 | |
| 
 | |
|     }*/
 | |
|     android {
 | |
|         lintOptions {
 | |
|             abortOnError false
 | |
|         }
 | |
|     }
 | |
|     sourceSets {
 | |
|         main {
 | |
|             jniLibs.srcDirs = ['libs']
 | |
|         }
 | |
|     }
 | |
|     compileOptions {
 | |
|         sourceCompatibility JavaVersion.VERSION_1_8
 | |
|         targetCompatibility JavaVersion.VERSION_1_8
 | |
| 
 | |
|     }
 | |
| }
 | |
| 
 | |
| def releaseTime() {
 | |
|     return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
 | |
| }
 | |
| 
 | |
| dependencies {
 | |
|     implementation fileTree(include: ['*.jar'], dir: 'libs')
 | |
|     implementation 'com.android.support:appcompat-v7:28.0.0'
 | |
|     implementation 'com.android.support:design:28.0.0'
 | |
|     implementation 'com.android.support.constraint:constraint-layout:1.1.3'
 | |
|     implementation 'com.android.support:support-vector-drawable:28.0.0'
 | |
|     implementation 'com.android.support:support-v4:28.0.0'
 | |
|     implementation 'android.arch.lifecycle:extensions:1.1.1'
 | |
|     implementation 'com.google.android.gms:play-services-plus:16.0.0'
 | |
|     testImplementation 'junit:junit:4.12'
 | |
|     androidTestImplementation 'com.android.support.test:runner:1.0.2'
 | |
|     androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
 | |
|     api 'com.jakewharton:butterknife:9.0.0'
 | |
|     annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0'
 | |
|     // api 'com.google.daggerdagger:2.9'
 | |
|     // annotationProcessor  'com.google.dagger:dagger-compiler:2.9'
 | |
|     //  api 'com.google.dagger:dagger:2.11'
 | |
|     //  annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
 | |
|     implementation 'com.youth.banner:banner:1.4.10'
 | |
|     api 'com.github.bumptech.glide:glide:4.6.1'
 | |
|     implementation 'com.google.code.gson:gson:2.8.5'
 | |
|     //  implementation 'com.viewpagerindicator:library:2.4.1'
 | |
|     //implementation 'com.github.auv1107:tablayout-android:-SNAPSHOT'
 | |
|     implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
 | |
|     implementation 'io.alterac.blurkit:blurkit:1.1.1'
 | |
|     implementation 'org.litepal.android:java:3.0.0'
 | |
|     api 'com.astuetz:pagerslidingtabstrip:1.0.1'
 | |
|     implementation 'com.squareup.retrofit2:retrofit:2.5.0'
 | |
|     implementation 'io.reactivex.rxjava2:rxjava:2.2.7'
 | |
|     implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
 | |
|     implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
 | |
|     implementation 'com.squareup.okhttp3:logging-interceptor:3.14.0'
 | |
|     implementation 'com.packetzoom:pz-okhttp3-interceptor:3.2.43'
 | |
|     api 'io.reactivex.rxjava2:rxandroid:2.1.0'
 | |
|     implementation 'com.github.bumptech.glide:glide:4.9.0'
 | |
|     implementation 'jp.wasabeef:glide-transformations:2.0.1'
 | |
|     implementation 'com.timqi.collapsibletextview:library:1.1.2'
 | |
|     // implementation 'com.ms-square:expandableTextView:0.1.4'
 | |
|     //  implementation 'com.github.tangguna:SearchBox:1.0.1'
 | |
|     implementation 'com.github.chengzipi:Searchbox:v1.0.0'
 | |
|     implementation 'com.github.ixiaow:multilayout:1.0.0'
 | |
|     implementation 'com.umeng.umsdk:analytics:8.0.2'
 | |
|     implementation 'com.umeng.umsdk:common:2.0.2'
 | |
|     implementation 'q.rorbin:VerticalTabLayout:1.2.5'
 | |
|     implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
 | |
|     implementation(name: 'open_ad_sdk', ext: 'aar')
 | |
|     implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
 | |
|     implementation 'com.google.android.gms:play-services-ads:17.2.1'
 | |
| }
 |