forked from apache/cordova-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use latest Android SDK tools for easier license handling * Reduce installed SDK components to minimum (tools & build tools) * Reduce unnecessary PATH manipulation * Use preinstalled Gradle on Travis CI * Improve Gradle output on Travis CI * Use default image on AppVeyor * Improve formatting & other minor tweaks
- Loading branch information
1 parent
032d1fa
commit 828b5f0
Showing
2 changed files
with
48 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,36 @@ | ||
image: | ||
- Previous Visual Studio 2015 | ||
|
||
environment: | ||
ANDROID_HOME: "C:\\android" | ||
# If the gradle daemon is used, the build hangs after generating the wrapper | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false | ||
matrix: | ||
- nodejs_version: "4" | ||
- nodejs_version: "6" | ||
- nodejs_version: "8" | ||
|
||
init: | ||
- mkdir "%ANDROID_HOME% | ||
- cd "%ANDROID_HOME%" | ||
- appveyor DownloadFile "https://dl.google.com/android/repository/tools_r25.2.3-windows.zip" | ||
- 7z x "tools_r25.2.3-windows.zip" > nul | ||
- cd "C:\projects\cordova-android" | ||
ANDROID_HOME: "C:\\android" | ||
|
||
# If the gradle daemon is used, the build hangs after generating the wrapper | ||
GRADLE_OPTS: -Dorg.gradle.daemon=false | ||
|
||
# URL for SDK Tools, Revision 26.1.1 (September 2017) | ||
SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip | ||
|
||
matrix: | ||
- nodejs_version: 4 | ||
- nodejs_version: 6 | ||
- nodejs_version: 8 | ||
|
||
install: | ||
- choco install gradle -version 3.4.1 | ||
- gradle -version | ||
- echo y | "%ANDROID_HOME%\tools\android.bat" --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository | ||
# on windows we need to accept sublicenses for the new tooling, wee. 30 is an arbitrary number, | ||
# but should be the maximum number of licenses we explicitly need to type "Y ENTER" for. | ||
# also, the sdkmanager in all its glory leaks a bit of output to stderr, and powershell | ||
# and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER" | ||
# responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update itself. | ||
- ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android\tools\bin\sdkmanager.bat 2>&1' --update | ||
- ps: Install-Product node $env:nodejs_version | ||
- npm install | ||
# below is a workaround on using gradle installed via choco on appveyor | ||
- set path=C:\ProgramData\chocolatey\lib\gradle\tools\gradle-3.4.1\bin;%path% | ||
# Install Android SDK Tools | ||
- mkdir "%ANDROID_HOME%" | ||
- appveyor DownloadFile "%SDK_TOOLS_URL%" -FileName "%TMP%/sdk-tools.zip" | ||
- 7z x "%TMP%/sdk-tools.zip" -o"%ANDROID_HOME%" > nul | ||
- set PATH=%PATH%;"%ANDROID_HOME%\tools\bin" | ||
|
||
- yes 2> nul | sdkmanager --licenses > nul | ||
- sdkmanager "build-tools;26.0.2" | ||
|
||
- choco install gradle --version 3.4.1 | ||
|
||
- ps: Install-Product node $env:nodejs_version | ||
- npm install | ||
|
||
build: off | ||
|
||
test_script: | ||
- node --version | ||
- npm --version | ||
- npm test | ||
- gradle --version | ||
- node --version | ||
- npm --version | ||
- npm test |