File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,10 @@ matrix:
3333 git :
3434 submodules : false
3535 script :
36- - " ./gradlew -PpreReleaseVersion=$PACKAGE_VERSION -PgitCommitVersion=$TRAVIS_COMMIT --stacktrace"
36+ # (PR) build the runtime only once, with the c++ code optimizations
37+ - ' if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./gradlew -PskipUnoptimized -PpreReleaseVersion=$PACKAGE_VERSION -PgitCommitVersion=$TRAVIS_COMMIT --stacktrace; fi'
38+ # (master branch) build the runtime twice - optimized, and regular packages
39+ - ' if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./gradlew -PpreReleaseVersion=$PACKAGE_VERSION -PgitCommitVersion=$TRAVIS_COMMIT --stacktrace; fi'
3740 - echo no | android create avd --force -n $EMULATOR_NAME-$EMULATOR_API_LEVEL -t android-$EMULATOR_API_LEVEL --abi $ANDROID_ABI -c 12M
3841 - emulator -avd $EMULATOR_NAME-$EMULATOR_API_LEVEL -no-skin -no-audio -no-window &
3942 - android-wait-for-emulator
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ def localMetadataGen = "../android-metadata-generator/dist/tns-android-metadata-
1818def distDir = " $projectDir /dist"
1919def pVersion = " no package version was provided by build.gradle build"
2020def arVersion = " no commit sha was provided by build.gradle build"
21+ def generateRegularRuntimePackage = ! project. hasProperty(" skipUnoptimized" );
2122
2223task checkEnvironmentVariables {
2324 if (" $System . env . JAVA_HOME " == " " || " $System . env . JAVA_HOME " == " null" ) {
@@ -130,7 +131,10 @@ task getCommitVersion {
130131task generateRuntime {
131132 doFirst {
132133 tasks. generateOptimizedRuntimeAar. execute();
133- tasks. generateRuntimeAar. execute();
134+
135+ if (generateRegularRuntimePackage) {
136+ tasks. generateRuntimeAar. execute();
137+ }
134138 }
135139}
136140
You can’t perform that action at this time.
0 commit comments