Jenkins+gradle+git APK package automatically and upload to FTP

Source: Internet
Author: User
Tags ftp connection

Software Installation:

1. Install Jenkins, git, androidsdk

2. Configuring ANDROIDSDK Environment variables

Android_home:d:\androidsdk

Path:%android_home%\platform-tools;%android_home%\tools

Environment configuration:

1. Open Jenkins Home page, enter system Management--plugin management--Optional plugin list, install Gradleplugin, Gitplugin, Publishoverftpplugin

2. Enter system settings , set environment variables, configure FTP connection information

3. Go to the Global tool Configuration page, set up JDK, git, gradle installation directory

New Task & Configuration Job

1. Create Job

Set the parameterized build, debug is open debugging, release is off debugging

Ps:gradle default cache directory under the C disk, the cache path is longer, compile error, as shown, so we have to create a new cache directory under the other disk, and then compile the command followed by the-g+ cache path. So the problem is solved.

Upload apk to ftp specified directory

Return to the job list, choose Build with parameters, choose Debug or Release, click Start Build

Build success

After uploading successfully, visit FTP to view

Jenkins+gradle+git APK package automatically and upload to FTP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.