Travis CI 㧠Android ããã¸ã§ã¯ãããã«ãããï¼Î²çï¼
Travis CIãAndroid のビルドに対応したããã§ãï¼Î²çã§ãã ï¼ããã£ããã公式ドキュメントãã¾ã¨ãã¦ã¿ã¾ããã
è¦å
æ¬æ©è½ã¯éçºä¸ã§ãããå¾æ¹äºææ§ããã¤ã°ã¬ã¼ã·ã§ã³ã®ãµãã¼ããªãå¤æ´ãããæããããã¾ãã
ãã®ã¬ã¤ããã«ãã¼ããç¯å²
ãã®ã¬ã¤ã㯠Android ããã¸ã§ã¯ãã«é¢ãã ãã«ãç°å¢åã³è¨å®ã®ãããã¯ã«ç¦ç¹ãå½ã¦ã¦ãã¾ããæåã«ãGetting Started 㨠general build configuration guides ãèªãã§ãã ããã
Android ããã¸ã§ã¯ãåã CI ç°å¢
æ¦è¦
Travis CI ç°å¢ã¯ãè¤æ°ã®JDK, Ant, Gradle, Maven, sbt, Leiningen ã¨ãã£ã JVM è¨èªåãã®ãã«ããã¼ã«ã»ãããæä¾ãã¾ãã
以ä¸ã®ããã«è¨å®ãã¾ãï¼
language: android
.travis.yml ãã¡ã¤ã«ã§ãããã¸ã§ã¯ãã¯ä»¥ä¸ã®ããªã¤ã³ã¹ãã¼ã«ããã Android SDK 22.6.2 ã® Android ç°å¢ã§ãã«ãããã¾ãã
Android SDK ã³ã³ãã¼ãã³ãã®ã¤ã³ã¹ãã¼ã« or ã¢ãããã¼ãã®æ¹æ³
.travis.yml ã§ã以ä¸ã®ä¾ã«ç¤ºãããã«ããªãã·ã§ã³ã¨ãã¦ã¤ã³ã¹ãã¼ã«ã¨ã©ã¤ã»ã³ã¹ãå諾ãã SDK ã®ã³ã³ãã¼ãã³ããå®ç¾©ã§ãã¾ãï¼
language: android android: components: - tools - build-tools-19.0.1 - android-19 - sysimg-19 - extra-android-support licenses: - android-sdk-license-bcbbd656 - '.*intel.+'
(対話åã®ããã³ããã§èªåçã«å¯¾è©±ããããã«ã³ãã³ãã使ç¨ãããããã«ãTcl syntaxã使ã£ã¦)æ£è¦è¡¨ç¾ã§ã©ã¤ã»ã³ã¹ãåç §ãããã¨ãã§ããä¸æ¹ãæ£ç¢ºãªã³ã³ãã¼ãã³ãåãæå®ãããªããã°ãªãã¾ããã
ç¹å®ã®ã©ã¤ã»ã³ã¹ãæå®ããã¦ããªãå ´åãTravis CI 㯠ããã©ã«ãã¨ã㦠android-sdk-license-bcbbd656 ã®ã¿è¨±å®¹ãã¾ãã
language: android android: components: - build-tools-18.1.1 - android-8
ã¨ãã¥ã¬ã¼ã¿ã®ä½æã¨éå§ã®æ¹æ³
ãããã®ã¹ããã㯠Travis CI Androidãã«ãã¼ã§ãµãã¼ãããã¾ãããåºæ¬çã« wait_for_emulator ã®ãããªã¹ã¯ãªããã移æ¤ãããã¹ããã¨ãã¥ã¬ã¼ã¿ã§å®è¡å¯è½ãªããã« .travis.yml ãé©ç¨ããå¿
è¦ãããã¾ãã
ä¾åæ§ã®ç®¡ç
Travis CI Android ãã«ãã¼ã¯ãããã¸ã§ã¯ããï¼ä»ã«å½±é¿ãä¸ããã«ãã¹ããå®è¡ããåã«ããã¸ã§ã¯ãã®ä¾åæ§ãèªåçã«ä¸ãã ï¼Maven ã Gradle ã®ãã㪠JVM ãã«ããã¼ã«ã«ãã£ã¦ãã«ãããããã¨ãä»®å®ãã¦ãã¾ãã
ããããã¸ã§ã¯ãã Ant ããã®ä»ã®ãã«ããã¼ã«ã§ãã«ããããå ´åãä¾åæ§ã¯èªåçã«ã¯ãã³ãã«ããããinstall: ãã¼ã使ç¨ãã¦æ£ç¢ºãªã³ãã³ãã .travis.yml ã«æå®ããå¿
è¦ãããã¾ãã
ä¾ï¼
language: android install: ant deps
Maven åãããã©ã«ããã¹ãã³ãã³ã
ããã¸ã§ã¯ãããªãã¸ããªã®ã«ã¼ãã« pom.xml ãå«ã¿ãbuild.gradle ãå«ã¾ãªãå ´åãMaven 3ããã«ãã«ä½¿ç¨ããã¾ãããã¹ãã¹ã¤ã¼ããå®è¡ããããã«ä½¿ç¨ãããããã©ã«ãã¯æ¬¡ã®ã¨ããã
mvn install -B
ããã¯ãgeneral build configuration ã¬ã¤ãã«è¨è¼ããã¦ããå
容ã§ãªã¼ãã¼ã©ã¤ãå¯è½ã§ãã
Gradleåãããã©ã«ããã¹ãã³ãã³ã
ããã¸ã§ã¯ãã®ãªãã¸ããªã«ã¼ãã« build.gradle ãå«ãå ´åãGradle ããã«ãã«ä½¿ç¨ããã¾ãããã¹ãã¹ã¤ã¼ããå®è¡ããããã«ä½¿ç¨ãããããã©ã«ãã¯æ¬¡ã®ã¨ããã
gradle build connectedCheck
ããã¸ã§ã¯ãã®ãªãã¸ããªã«ã¼ãã« gradlew ã©ããã¼ã¹ã¯ãªãããå«ã¾ããå ´åãTravis Android ãã«ãã¼ã¯ä»£ããã«ä½¿ç¨ã試ã¿ã¾ãã
ããã©ã«ãã®ã³ãã³ãã¯ä»¥ä¸ã®ããã«ãªãã¾ãï¼
./gradlew build connectedCheck
ããã¯ãgeneral build configuration ã¬ã¤ãã«è¨è¼ããã¦ããå
容ã§ãªã¼ãã¼ã©ã¤ãå¯è½ã§ãã
ããã©ã«ããã¹ãã³ãã³ã
Travis CI ã Maven ã¾ã㯠Gradle ãã¡ã¤ã«ãè¦ã¤ããããªãå ´åãTravis CI Android ãã«ãã¼ã¯ ããã¸ã§ã¯ãã®ãã«ãã« Ant ã®ä½¿ç¨ã試ã¿ã¾ãã
ãã¹ãã¹ã¤ã¼ããå®è¡ããããã®ããã©ã«ãã¯ä»¥ä¸ã®ããã«ä½¿ç¨ããã¾ãã
ant debug installt test
ããã¯ãgeneral build configuration ã¬ã¤ãã«è¨è¼ããã¦ããå
容ã§ãªã¼ãã¼ã©ã¤ãå¯è½ã§ãã
è¤æ°ã® JDK ã§ãã¹ã
ä»»æã®JVMè¨èªã«ã¤ãã¦ãè¤æ°ã®JDKã«å¯¾ãã¦ãã¹ããããã¨ãå¯è½ã§ãã
ãã«ããããªã¯ã¹
Android ããã¸ã§ã¯ãåãã§ã¯ãenv 㨠jdk ã¯ãã«ããããªã¯ã¹ãçæããããã®é
åã¨ãã¦ä¸ãããã¾ãã
ä¾
- roboguice/roboguice(Google Guice on Android)
- ruboto/ruboto (A platform for developing apps using JRuby on Android)
- RxJava in Android Example Project
- Gradle Example Project (the wait for the emulator must be fixed)
- Maven Example Project (still using language: java, see pending pull request)