Commit b23fa06e by chengfengpiaopiao

jenkins 打包配置

parent 726221e1
Showing with 50 additions and 45 deletions
...@@ -80,55 +80,58 @@ android { ...@@ -80,55 +80,58 @@ android {
android.applicationVariants.all { variant -> android.applicationVariants.all { variant ->
variant.outputs.each { output -> variant.outputs.each { output ->
def outputFile = output.outputFile def outputFile = output.outputFile
print("outputFile" + outputFile);
def channelName = variant.productFlavors[0].name def channelName = variant.productFlavors[0].name
if("false".equals(IS_JENKINS)){ def fileName
def fileName ="duobaojingcai_${channelName}_v${defaultConfig.versionName}${suffixName[networkType]}.apk" def projectName = PROJECT_NAME
output.outputFile = new File(outputFile.parent, fileName) if ("false".equals(IS_JENKINS)) {
}else{ fileName = "duobaojingcai_${channelName}_v${defaultConfig.versionName}${suffixName[networkType]}.apk"
outputFile = "G:/Apks/${projectName}"
} else {
channelName = PRODUCT_FLAAVOR_BUILD channelName = PRODUCT_FLAAVOR_BUILD
def env = ENVIRONMENT def env = ENVIRONMENT
def packTime = getDate(); def packTime = getDate();
def fileName; outputFile = "/vagrant/jenkins/jenkins-workspace/walleApps/${projectName}"
//outputFile = "/vagrant/jenkins/jenkins-workspace/walleApps" if ("release".equals(env)) {
outputFile = "/var/jenkins_home/walleApps" fileName = "duobaojingcai_${channelName}_v${defaultConfig.versionName}_${env}.apk"
if("release".equals(env)){ outputFile = outputFile + "/release"
fileName = "duobaojingcai_${channelName}_v${defaultConfig.versionName}_${env}.apk" } else {
}else{ fileName = "duobaojingcai_${channelName}_v${defaultConfig.versionName}_${env}_${packTime}.apk"
fileName = "duobaojingcai_${channelName}_v${defaultConfig.versionName}_${env}_${packTime}.apk" outputFile = outputFile + "/inside-test"
} }
output.outputFile = new File(outputFile, fileName)
} }
output.outputFile = new File(outputFile, fileName)
} }
} }
}
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
}) })
compile "com.android.support:support-v13:23.1.0" compile "com.android.support:support-v13:23.1.0"
testCompile 'junit:junit:4.12' testCompile 'junit:junit:4.12'
compile "com.jakewharton:butterknife:6.1.0" compile "com.jakewharton:butterknife:6.1.0"
compile "com.squareup.retrofit2:retrofit:2.0.2" compile "com.squareup.retrofit2:retrofit:2.0.2"
compile "com.squareup.retrofit2:converter-gson:2.0.2" compile "com.squareup.retrofit2:converter-gson:2.0.2"
compile "com.squareup.retrofit2:adapter-rxjava:2.0.2" compile "com.squareup.retrofit2:adapter-rxjava:2.0.2"
compile 'io.reactivex:rxandroid:1.2.1' compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.9' compile 'io.reactivex:rxjava:1.1.9'
compile 'com.google.code.gson:gson:2.6.2' compile 'com.google.code.gson:gson:2.6.2'
compile "com.squareup.okhttp3:logging-interceptor:3.1.0" compile "com.squareup.okhttp3:logging-interceptor:3.1.0"
compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:1.0.2' compile 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:1.0.2'
compile 'cz.msebera.android:httpclient:4.4.1.1' compile 'cz.msebera.android:httpclient:4.4.1.1'
//底部tab选择器 //底部tab选择器
compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar' compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
//友盟统计 //友盟统计
compile 'com.umeng.analytics:analytics:latest.integration' compile 'com.umeng.analytics:analytics:latest.integration'
//walle //walle
compile 'com.meituan.android.walle:library:1.1.5' compile 'com.meituan.android.walle:library:1.1.5'
//图片选择器 //图片选择器
compile project(path: ':multi-image-selector') compile project(path: ':multi-image-selector')
//权限申请 //权限申请
compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.3@aar' compile 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.3@aar'
} }
}
\ No newline at end of file
...@@ -26,12 +26,14 @@ org.gradle.jvmargs=-XX:MaxPermSize=1024m ...@@ -26,12 +26,14 @@ org.gradle.jvmargs=-XX:MaxPermSize=1024m
?android.useDeprecatedNdk=true ?android.useDeprecatedNdk=true
#Project
PROJECT_NAME = DuoBaoJingCai
#jenkins #jenkins
APP_VERSION = 2.0.0 APP_VERSION = 2.0.0
IS_JENKINS = false IS_JENKINS = false
ENVIRONMENT = "debug" ENVIRONMENT = debug
PRODUCT_FLAAVOR_BUILD = "base" PRODUCT_FLAAVOR_BUILD = base
#dynamicparamter has a bug #dynamicparamter has a bug
JENKINS_TIME = "" JENKINS_TIME = ""
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment