构建发布 Gradle: The New Android Build System

laofo · 2013年11月19日 · 8 次阅读

[i=s] 本帖最后由 laofo 于 2013-11-19 15:53 编辑

WHAT IS GRADLE?

Gradle: The New Android Build System

Google selected Gradle as the foundation of the Android SDK build system because it provides flexibility along with the ability to define common standards for Android builds. With Gradle, Android developers can use a simple, declarative DSL to configure Gradle builds supporting a wide variety of Android devices and App stores. With a simple, declarative DSL, Gradle developers have access to a single, authoritative build that powers both the Android Studio IDE and builds from the command-line. Gradleware is supporting the transition from Ant to Gradle by offering Gradle migration services for Android developers as well as Android-focused training classes.

Features and Benefits

Integration with Android Studio - With Gradle, IDE integration isn't an afterthought. Android Studio is deeply integrated with the new Gradle-based Android build system.

Simple, Declarative, Domain-specific Language - Gradleware worked together with Google to create a simple, declarative DSL for Android builds.

A Single Build System - Gradle is the authoritative build across the IDE and the command-line. This means that the same build that powers Android Studio will power your command-line and continuous-integration builds.

Product Flavors, Build Variants, and Build Type - Many mobile applications have a free version and a paid version while other applications may ship seasonal variations. With Gradle product flavors are easy to manage with a few lines of code. Build types control application packaging and build configuration for different types of debug and release builds.

Android Signing Configuration - The Gradle Android DSL provides a very simple way to customize keystores and signing configuration across different build types.

Dependency Management - Gradle offers a flexible approach to dependency management that can reuse existing Maven repositories or reference local JARs. If you depend on libraries from Cntral or if you run your own local repositories, Gradle can adapt to any requirement.

Multi-project Support - Gradle supports multi-project builds from both the IDE and the command-line. With Gradle you can easily create builds that span multiple application and library projects.

Binary Bundles for Libaries (.aar) - Gradle supports the new .aar binary bundle format for library projects.

Full Incremental Builds - The new Gradle-based Android build system has been designed for developer efficiency. Gradle's support for incremental tasks means you spend less time waiting and more time coding.

A Focus on Testing - The Gradle-based Android build system bring a new focus on testing. With Gradle you can run unit and integration tests without creating subprojects. Gradle supports several scenarios for integration testing on build servers.

Test Server API supports Hosted Testing - Integration with Jenkins-based build servers and services from AppThwack, TestDroid, and Manymo means that your build can support complex, massively-parallel integration testing scenarios.

建议在构建管理下增加 gradle 板块

需要 登录 后方可回复。