Jenkis 打包 AS 项目

build.gradle:添加红色部 分,服务器使用的gradle是2.13,文件内要求的是2.2,红色部分禁用版本检查(2.4以上版本速度快很多)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
System.properties['com.android.build.gradle.overrideVersionCheck'] = 'true'
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
    /* dependencies {
         compile 'com.github.User:Repo:Tag'
     }*/
}
----------------------
local.properties:修改了红色部分,服务器与开发机android sdk路径不同,如果修改了这个文件, 提交请额外注意

## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Tue Mar 29 10:39:19 CST 2016
#sdk.dir=C\:\\Users\\Administrator\\AppData\\Local\\Android\\sdk
sdk.dir=/usr/local/android-sdk-linux
idea.cycle.buffer.size=10240000


------------------
app/build.gradle:添加红色部分,使Lint检查出错不至于中断编译

apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1'

    defaultConfig {
        applicationId "com.tuliu.servercenter"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            jniLibs.srcDir 'libs'
        }
    }
    lintOptions {
        // Don't abort if Lint finds an error, otherwise the Jenkins build
        // will be marked as failed, and Jenkins won't analyse the Lint output
        abortOnError false
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.jakewharton:butterknife:8.0.1'
    apt 'com.jakewharton:butterknife-compiler:8.0.1'
    compile 'com.mcxiaoke.volley:library:+'
    compile 'com.android.support:support-v4:+'
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.bigkoo:pickerview:2.0.8'
    compile 'com.kyleduo.switchbutton:library:1.4.0'
    compile files('libs/baidumapapi_map_v3_7_3.jar')
}


当前生成的服务中心 apk文件使用了之前项目Tuliu_APP相同的release key 进行签名
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值