diff --git a/app/.gitignore b/app/.gitignore index dc5ca96..ea1c983 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1,2 +1,4 @@ /build /release/ +/rap2debug/ +/serverdebug/ diff --git a/app/build.gradle b/app/build.gradle index 259810c..afb9760 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,10 +1,20 @@ ext { + //本地服务端测试地址,把ip地址部分改成ipconfig /all找到的内网地址 API_HOST = 'http://192.168.3.132:8080/' + //本地rap2服务端测试地址,把ip地址部分改成ipconfig /all找到的内网地址 RAP2_API_HOST = 'http://192.168.3.132:38080/app/mock/1' } apply plugin: 'com.android.application' apply plugin: 'multi-languages' android { + signingConfigs { + debug { + storeFile file('pan.key') + storePassword 'panpan' + keyAlias = 'pan' + keyPassword 'panpan' + } + } compileSdkVersion 29 buildToolsVersion "29.0.3" @@ -20,7 +30,15 @@ android { buildTypes { debug{ - buildConfigField('String','API_HOST',"\""+API_HOST+"\"") + buildConfigField('String','API_HOST',"\""+RAP2_API_HOST+"\"") + + signingConfig=signingConfigs.debug + } + + rap2debug { + buildConfigField('String','API_HOST',"\""+RAP2_API_HOST+"\"") + + signingConfig=signingConfigs.debug } release { @@ -28,6 +46,13 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' buildConfigField('String','API_HOST',"\""+API_HOST+"\"") + + signingConfig=signingConfigs.debug + } + serverdebug { + buildConfigField('String','API_HOST',"\""+API_HOST+"\"") + + signingConfig=signingConfigs.debug } } sourceSets { diff --git a/app/my.key b/app/my.key deleted file mode 100644 index 5d83e29..0000000 Binary files a/app/my.key and /dev/null differ diff --git a/app/pan.key b/app/pan.key new file mode 100644 index 0000000..1d62cb3 Binary files /dev/null and b/app/pan.key differ