Skip to content

Commit

Permalink
feat: Kotlin 2 + Gradle 8+ (#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz authored Jul 2, 2024
1 parent 109bdd9 commit d4b7164
Show file tree
Hide file tree
Showing 20 changed files with 765 additions and 277 deletions.
45 changes: 23 additions & 22 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,34 @@ fi
./gradlew runSbgTests

for emulator in $listOfEmulators; do
echo "Start emulator $emulator"
$ANDROID_HOME/emulator/emulator -avd ${emulator} -verbose -wipe-data -gpu on&
find ~/.android/avd/${emulator}.avd -type f -name 'config.ini' -exec cat {} +
echo "Start emulator $emulator"
$ANDROID_HOME/emulator/emulator -avd ${emulator} -verbose -wipe-data -gpu on&
find ~/.android/avd/${emulator}.avd -type f -name 'config.ini' -exec cat {} +

echo "Run Android Runtime unit tests for $emulator"
$ANDROID_HOME/platform-tools/adb wait-for-device
$ANDROID_HOME/platform-tools/adb -s emulator-5554 logcat -c
$ANDROID_HOME/platform-tools/adb -s emulator-5554 logcat > consoleLog.txt&
$ANDROID_HOME/platform-tools/adb -s emulator-5554 logcat > consoleLog$emulator.txt&
echo "Run Android Runtime unit tests for $emulator"
$ANDROID_HOME/platform-tools/adb wait-for-device
$ANDROID_HOME/platform-tools/adb -s emulator-5554 logcat -c
$ANDROID_HOME/platform-tools/adb -s emulator-5554 logcat > consoleLog.txt&
$ANDROID_HOME/platform-tools/adb -s emulator-5554 logcat > consoleLog$emulator.txt&

if [ "$1" != 'unit_tests_only' ]; then
./gradlew runtests
else
./gradlew runtests -PonlyX86
fi
if [ "$1" != 'unit_tests_only' ]; then
./gradlew runtests
else
./gradlew runtests -PonlyX86
fi

echo "Rename unit test result"
(
cd ./test-app/dist
mv android_unit_test_results.xml $emulator.xml
)
echo "Rename unit test result"
(
cd ./test-app/dist
mv android_unit_test_results.xml $emulator.xml
)

echo "Stopping running emulators"
for KILLPID in `ps ax | grep 'emulator' | grep -v 'grep' | awk ' { print $1;}'`; do kill -9 $KILLPID; done
for KILLPID in `ps ax | grep 'qemu' | grep -v 'grep' | awk ' { print $1;}'`; do kill -9 $KILLPID; done
for KILLPID in `ps ax | grep 'adb' | grep -v 'grep' | awk ' { print $1;}'`; do kill -9 $KILLPID; done
echo "Stopping running emulators"
for KILLPID in `ps ax | grep 'emulator' | grep -v 'grep' | awk ' { print $1;}'`; do kill -9 $KILLPID; done
for KILLPID in `ps ax | grep 'qemu' | grep -v 'grep' | awk ' { print $1;}'`; do kill -9 $KILLPID; done
for KILLPID in `ps ax | grep 'adb' | grep -v 'grep' | awk ' { print $1;}'`; do kill -9 $KILLPID; done
done

echo $cwd
cd $cwd

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nativescript/android",
"description": "NativeScript for Android using v8",
"version": "8.7.0",
"version": "8.8.0-alpha.11",
"repository": {
"type": "git",
"url": "https://github.com/NativeScript/android.git"
Expand All @@ -10,20 +10,20 @@
"**/*"
],
"version_info": {
"v8": "8.3.110.9",
"gradle": "7.6",
"gradleAndroid": "7.4.2",
"ndk": "r21",
"ndkApiLevel": "22",
"v8": "10.3.22.0",
"gradle": "8.4",
"gradleAndroid": "8.3.2",
"ndk": "r23c",
"ndkApiLevel": "17",
"minSdk": "17",
"compileSdk": "32",
"buildTools": "32.0.0",
"kotlin": "1.7.10"
"compileSdk": "34",
"buildTools": "34.0.0",
"kotlin": "2.0.0"
},
"// this gradle key is here for backwards compatibility - we'll phase it out slowly...": "",
"gradle": {
"version": "7.6",
"android": "7.4.2"
"version": "8.4",
"android": "8.3.2"
},
"scripts": {
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
Expand Down
Loading

0 comments on commit d4b7164

Please sign in to comment.