본문 바로가기
Project Site

빌드 개요 Build Overview (3)

by 각종 잡상식 지식 모음 2016. 6. 10.
반응형

Build Overview


1. 소스 코드 확보하기    Getting the source code

Branches

안드로이드 스튜디오의 이전 버전에 대하여 다음과 같은 가능한 브랜치가 있습니다:
We currently have the following possible branches for previous versions of Android Studio:

 dev branch release branch IntelliJ Notes
 studio-1.0-dev studio-1.0-release idea13-dev This is the branch for 1.0 work CLOSED
 studio-1.1-dev studio-1.1-release idea13-1.1-dev This is the branch for 1.1 work CLOSED
 studio-1.2-dev studio-1.2-release idea14-1.2-dev This is the branch for 1.2 work CLOSED
 studio-1.3-dev studio-1.3-release idea14-1.3-dev This is the branch for 1.3 work CLOSED
    
studio-master-dev studio-master-dev studio-master-devUse the git tag "studio-1.4" to check out the 1.4 release.

The branches ub-tools-idea133 and ub-tools-master are deprecated. We are also not using master.

Development Branch

안드로이드 OS와 마찬가지로, 안드로이드 스튜디오는 오픈 소스로 모두에게 무료로 제공됩니다.
안드로이드는 여기에서 상세하게 설명된 각각의 안정된 배포 후, 안드로이드 오픈 소스 프로젝트(AOSP)에 소스 코드를 발표합니다.
안드로이드 스튜디오 1.4 기준으로, 안드로이드 스튜디오는 각각의 안정적 배포 이후,동일한 모델의 배포 소스 코드로 통입됩니다.
안드로이드 스튜디오에 기여하는 사람 입장에서, 코드 기여 프로세스는 기본적으로 안드로이드 플랫폼과 동일합니다.
안드로이드 스튜디오는 약 2~4개월 마다 안정된 버전을 배포할 계획이며, 이들 각각의 배포 때에 소스 코드를 사용할 수 있습니다.
안드로이드 스튜디오 AOSP 브랜치에 대한 패치를 계속하여 제출해주십시오.
코드 리뷰를 한 다음 안드로이드 스튜디오의 후속 버전에 변경 내용을 병합합니다.
안드로이드 스튜디오에 대한 협력과 노력에 대한 커뮤니티 내 모든 분들에게 매우 감사드립니다.
Like the Android operating system, Android Studio is open source and free of charge to all. Android releases source code to the Android Open Source Project (AOSP) after each stable release, described in detail here. As of Android Studio 1.4, Android Studio is aligning to the same model of releasing source code after each stable release. For those who contribute to Android Studio, the code contribution process is essentially the same as the Android platform. We expect to continue to release a stable version of Android Studio approximately every 2 -4 months, and at each of the these release the source code will be made available. Please continue to submit patches to the Android Studio AOSP branch. We will do code-reviews and merge changes into subsequent versions of Android Studio. We're incredibly grateful to all of you in the community for your collaboration and hard work on Android Studio.

Tags

The following release tags are available
  • studio-1.4-release
  • studio-1.5-release

Doing a Checkout

먼저, 플랫폼에 대한 사전사항을 설치해야 합니다.
이것은 git, C compiler 등을 가져야 함을 의미합니다.
여기 몇 가지 스텝이 있으며, 이것은 모두 플랫폼에 따라 달라지기 때문에, 상세한 지침이 있는 공식 build 지침 
http://source.android.com/source/initializing.html으로 가야 합니다.
First, you'll need to install the prerequisites for your platform. This means you'll have git, a C compiler, etc. There are quite a few steps here, and it's all platform dependent, so go to the official build instructions where we have detailed instructions:  
http://source.android.com/source/initializing.html.

플랫폼 빌딩을 계획하는 것이 아니라면, 일부 요구사항(예, case-sensitive file system)은 필요하지 않습니다.
Mac이라면 에뮬레이터를 빌드하기 위한 XCode가 필요합니다.
Some of the requirements are not needed (case-sensitive file system for instance), unless you also plan on building the platform. If you're on Mac you will still need XCode to build the emulator.

모든 것을 컨피규어하고 나면, http://source.android.com/source/downloading.html의 지침에 따라 'repo' 도구들을 다운로드 하세요
Once you have everything configured, download the 'repo' tools by following the instructions here: 
http://source.android.com/source/downloading.html

그런 다음 shell에서 다음 커맨드를 사용하여 소스 코드를 점검할 수 있습니다:
Then you can check out the source code using the following commands in a shell:
$ mkdir studio-master-dev
$ cd studio-master-dev
$ repo init -u https://android.googlesource.com/platform/manifest -b studio-master-dev
$ repo sync
(You can obviously call the top level directory what you want; those of us who check out multiple branches prefer to name the directories after the branches.)

During the repo init command, it will ask you for your name and e-mail address; these will be used later if you decide to check in changesets and upload them for review.

If you'd like to check out and build the 1.5 release tag, use the following command instead

$ repo init -u https://android.googlesource.com/platform/manifest -b studio-1.5

followed by repo sync as before.

Doing a checkout of a specific release

We are starting to tag releases. This means you can use the tag to get the source code for a specific version. We are currently using the following tags:

 Gradle gradle_x.y.z 
 Studio studio-x.y
You can see all available tags here: 
https://android.googlesource.com/platform/manifest/+refs

For instance you can do a checkout of version 1.0.0 of the Gradle plugin with the following command:

$ repo init -u https://android.googlesource.com/platform/manifest -b gradle_1.0.0
$ repo sync

For Studio 1.4, the release tag was "studio-1.4", for 1.5,  "studio-1.5", etc.

2. Building

The parts of the SDK that can be build with the studio-* branches are only the IDE components and the SDK Tools. Each component is build differently due to varying build systems.

None of them uses the make-based build system of the platform.

Building Android Studio

Historically, building the Android tools required building the full Android SDK as well, since for example the emulator needed the system image.

However, we've been gradually migrating the tools source code over to a more independent setup, and you can now build the Android Studio IDE without a full Android checkout and without a C compiler etc. The instructions for building Android Studio are listed in the Building Android Studio page; the remainder of this document documents the process for building the rest of the tools (the Eclipse plugin, the emulator, etc.)

Building the Android Gradle Plugin

For instructions, see Building the Android Gradle Plugin.

Building the Linux and MacOS SDK

This part only builds the SDK Tools. Follow these steps:
$ mkdir -p out/dist
$ ./tools/buildSrc/servers/build_tools.sh `pwd`/out `pwd`/out/dist 1234

This will build the SDK Tools for your current platform. the result is located in out/sdk/

This is composed of
  • The emulator and associated executables and libraries
  • Java-based standalone tools
  • Monitor

To work on the Java-based tools only, you can open the IJ project located in tools/base.

To build / test the java tools only:

$ cd tools/
$ ./gradlew assemble // builds only
$ ./gradlew check // runs tests as well.

Building the Windows SDK
These instructions are currently obsolete. Coming soon.

Full Windows SDK builds are only supported on Linux -- most of the framework is not designed to be built on Windows so technically the Windows SDK is build on top of a Linux SDK where a few binaries are replaced.

Setup:
$ sudo apt-get install mingw32 tofrodos

mingw32 is the cross-compiler, tofrodos adds a unix2dos command

To build:
$ . build/envsetup.sh
$ lunch sdk-eng
$ make win_sdk

Note that this will build both a Linux SDK then a Windows SDK. The result is located at
   out/host/windows/sdk/android-sdk_eng.username_windows/

Building the Deprecated Eclipse-based Tools.

To set up your Eclipse environment to build, edit and debug the deprecated Eclipse plug-ins for Android, see the "Building the Eclipse-Based Tools" document.


반응형

'Project Site' 카테고리의 다른 글

프로젝트 개요 Projects Overview (2)  (0) 2016.06.10
Downloads & Preview Channels (1)  (0) 2016.06.10

댓글