Skip to content

Commit

Permalink
Switch building of the unittest from Ant to Gradle (#3612)
Browse files Browse the repository at this point in the history
This was missed in b16f0c2
where the other targets were switched from Ant to Gradle.

This fixes building after switching to a newer version of the
Android SDK (suppporting Gradle) where Ant no longer is supported.
  • Loading branch information
mstorsjo authored Jan 4, 2023
1 parent b16f0c2 commit 045aeac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,13 @@ endif
ifeq (android,$(OS))
ifeq (./,$(SRC_PATH))
codec_unittest$(EXEEXT):
cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
$(NDK_BUILD) -C test/build/android -B
./gradlew unittest:assembleDebug

clean_Android: clean_Android_ut
clean_Android_ut:
-cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
-$(NDK_BUILD) -C test/build/android -B clean
-./gradlew unittest:clean
endif
endif

Expand Down
5 changes: 3 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include ':test-dec', ':test-enc'
include ':test-dec', ':test-enc', ':unittest'
project(':test-dec').projectDir = new File('codec/build/android/dec')
project(':test-enc').projectDir = new File('codec/build/android/enc')
project(':test-enc').projectDir = new File('codec/build/android/enc')
project(':unittest').projectDir = new File('test/build/android')
1 change: 1 addition & 0 deletions test/build/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ proguard-project.txt
gen
bin
project.properties
build
12 changes: 12 additions & 0 deletions test/build/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29

sourceSets.main {
manifest.srcFile "AndroidManifest.xml"
res.srcDir "res"
java.srcDir "src"
jniLibs.srcDir "libs"
}
}

0 comments on commit 045aeac

Please sign in to comment.