Commit b23fa06e by chengfengpiaopiao

jenkins 打包配置

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