1+ debug :
2+ ./gradlew :unity-ads:assembleDebug
3+
14release :
25 ./gradlew :unity-ads:assembleRelease
36
47clean :
58 ./gradlew :unity-ads:clean
69
7- test : test-hosted
10+ coverage :
11+ ./gradlew -i jacocoTestReport --debug
812
9- test-local : push- test-server-address exec-tests
13+ coverage-ci : debug test-ci coverage
1014
11- test-unit-tests : push-test-server-address exec-unit-tests
15+ zip : release
16+ cp unity-ads/build/outputs/aar/unity-ads-release.aar unity-ads.aar
17+ zip -9r unity-ads.aar.zip unity-ads.aar
18+ rm unity-ads.aar
1219
13- build-test-apk : clean
14- ./gradlew :unity-ads:assembleAndroidTest --full-stacktrace
20+ javadoc :
21+ ./gradlew :unity-ads:javadoc
1522
16- test-emulator : exec-tests
23+ device-connected :
24+ adb get-state 1> /dev/null 2>&1 && echo ' Device Attached' && exit 0 || echo ' Device NOT Attached' && exit -1
1725
18- test-hosted : push-test-server-address-hosted exec-tests
26+ wake-up-device :
27+ scripts/wakeUpDevice.sh
1928
20- test-usb : push-test-server-address-local setup-adb-reverse exec-only-unit- tests dismantle-adb-reverse
29+ test : device-connected wake-up-device run-all- tests
2130
22- exec-tests : exec-unit-tests exec-hybrid -tests
31+ test-local : device-connected wake-up-device push-test-server-address-ip run-all -tests
2332
24- exec-unit-tests : clean
25- adb shell input keyevent 82
26- ./gradlew :unity-ads:connectedCheck --full-stacktrace -Pandroid.testInstrumentationRunnerArguments.class=com.unity3d.ads.test.LegacyTestSuite
33+ test-local-webview-staging : device-connected wake-up-device push-test-server-address-staging run-all-tests
2734
28- exec-hybrid-tests : clean
29- adb shell input keyevent 82
30- ./gradlew :unity-ads:connectedCheck --full-stacktrace -Pandroid.testInstrumentationRunnerArguments.class=com.unity3d.ads.test.HybridTestSuite
35+ test-local-staging-localhost : device-connected wake-up-device push-test-server-address-localhost run-all-tests
3136
32- push-test-server-address :
33- echo https://$(shell ifconfig |grep "inet" |grep -E -o "([0-9]{1,3}[\.]) {3}[0-9]{1,3}" |grep -v -E " ^0| ^127" -m 1):8080 > testServerAddress.txt
34- adb push testServerAddress.txt /data/local/tmp
37+ run-all-tests : test-instrumentation test-legacy test-integration
3538
36- push-test-server-address-hosted :
37- echo " https://unity-ads-test-server.unityads.unity3d.com" > testServerAddress.txt
38- adb push testServerAddress.txt /data/local/tmp
39+ test-ci :
40+ ./gradlew connectedDebugAndroidTest -i -w --stacktrace -Pandroid.testInstrumentationRunnerArguments.class=com.unity3d.ads.test.InstrumentationTestSuite,com.unity3d.ads.test.LegacyTestSuite
3941
40- push-test-server-address-local :
41- echo " https://localhost:8080" > testServerAddress.txt
42- adb push testServerAddress.txt /data/local/tmp
42+ test-instrumentation :
43+ ./gradlew connectedDebugAndroidTest -i -w --stacktrace -Pandroid.testInstrumentationRunnerArguments.class=com.unity3d.ads.test.InstrumentationTestSuite
4344
44- setup-adb-reverse :
45- adb reverse tcp:8080 tcp:8080
45+ test-legacy :
46+ ./gradlew connectedDebugAndroidTest -i -w --stacktrace -Pandroid.testInstrumentationRunnerArguments.class=com.unity3d.ads.test.LegacyTestSuite
4647
47- dismantle-adb-reverse :
48- adb reverse --remove-all
48+ test-integration :
49+ ./gradlew connectedDebugAndroidTest -i -w --stacktrace -Pandroid.testInstrumentationRunnerArguments.class=com.unity3d.ads.test.IntegrationTestSuite
4950
50- javadoc :
51- ./gradlew :unity-ads:javadoc
51+ push-test-server-address-ip :
52+ echo http://$(shell ifconfig |grep "inet" |grep -E -o "([0-9]{1,3}[\.]) {3}[0-9]{1,3}" |grep -v -E " ^0| ^127" -m 1):8080 > testServerAddress.txt
53+ adb push testServerAddress.txt /data/local/tmp
5254
53- zip : release
54- cp unity-ads/build/outputs/aar/unity-ads-release.aar unity-ads.aar
55- zip -9r unity-ads.aar.zip unity-ads.aar
56- rm unity-ads.aar
55+ push-test-server-address-staging :
56+ echo " https://unity-ads-test-server.unityads.unity3d.com" > testServerAddress.txt
57+ adb push testServerAddress.txt /data/local/tmp
5758
58- verify-release-build :
59- if [[ -f " unity-ads.aar.zip" ]]; then \
60- echo ' unity-ads.aar.zip exists' ; \
61- else \
62- echo ' unity-ads.aar.zip does not exist' ; \
63- exit 1; \
64- fi ;
59+ push-test-server-address-localhost :
60+ echo " http://localhost:8080" > testServerAddress.txt
61+ adb push testServerAddress.txt /data/local/tmp
6562
6663use-local-webview :
67- sed -i ' ' ' s/return "https:\/\/config.unityads.unity3d.com\/webview\/" + getWebViewBranch() + "\/" + flavor + "\/config.json";/return "new-ip";/' " unity-ads/src/main/java/com/unity3d/services/core/properties/SdkProperties.java"
68- sed -i ' ' ' s/return ".*";/return "https :\/\/$(shell ifconfig |grep "inet" |grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" |grep -v -E "^0|^127" -m 1):8000\/build\/" + flavor + "\/config.json";/' " unity-ads/src/main/java/com/unity3d/services/core/properties/SdkProperties.java"
64+ sed -i ' ' ' s/return baseURI + getWebViewBranch() + "\/" + flavor + "\/config.json";/return "new-ip";/' " unity-ads/src/main/java/com/unity3d/services/core/properties/SdkProperties.java"
65+ sed -i ' ' ' s/return ".*";/return "http :\/\/$(shell ifconfig |grep "inet" |grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" |grep -v -E "^0|^127" -m 1):8000\/build\/" + flavor + "\/config.json";/' " unity-ads/src/main/java/com/unity3d/services/core/properties/SdkProperties.java"
6966
7067use-public-webview :
71- sed -i ' ' ' s/return ".*";/return "https:\/\/config.unityads.unity3d.com\/webview\/" + getWebViewBranch() + "\/" + flavor + "\/config.json";/' " unity-ads/src/main/java/com/unity3d/services/core/properties/SdkProperties.java"
68+ sed -i ' ' ' s/return ".*";/return baseURI + getWebViewBranch() + "\/" + flavor + "\/config.json";/' " unity-ads/src/main/java/com/unity3d/services/core/properties/SdkProperties.java"
7269
7370create-android-26-emulator :
71+ ${ANDROID_HOME} /tools/bin/sdkmanager --install " system-images;android-26;google_apis;x86"
7472 echo " no" | ${ANDROID_HOME} /tools/bin/avdmanager create avd --name " android-26-test" --package " system-images;android-26;google_apis;x86" --device " Nexus 6P" --tag google_apis --abi google_apis/x86 --force
7573
7674start-android-26-emulator :
7775 ${ANDROID_HOME} /emulator/emulator -port 5556 -avd android-26-test -no-window -noaudio -no-boot-anim -memory 2048 -partition-size 1024 &
76+
77+ kill-emulator :
78+ adb emu kill
0 commit comments