Browse Source

android: integrate ndk-build step into main gradle pipeline

this greatly simplifies the assembly of the android application. moreover, ndk
will be downloaded automatically via sdk-manager.
master
Alexander Epaneshnikov 4 years ago
parent
commit
95678616f7
No account linked to committer's email address
4 changed files with 9 additions and 14 deletions
  1. 3
    6
      Makefile.am
  2. 6
    2
      android/build.gradle
  3. 0
    3
      android/jni/Application.mk
  4. 0
    3
      configure.ac

+ 3
- 6
Makefile.am View File



##### android targets: ##### android targets:


jni: apk-release: espeakdata
cd android && ndk-build

apk-release: jni espeakdata
cd android && $(GRADLE) assembleRelease cd android && $(GRADLE) assembleRelease


apk-debug: jni espeakdata apk-debug: espeakdata
cd android && $(GRADLE) assembleDebug cd android && $(GRADLE) assembleDebug


apk-check: jni espeakdata apk-check: espeakdata
cd android && $(GRADLE) connectedCheck cd android && $(GRADLE) connectedCheck


android/res/raw/espeakdata.zip: espeak-ng-data/phontab dictionaries android/res/raw/espeakdata.zip: espeak-ng-data/phontab dictionaries

+ 6
- 2
android/build.gradle View File

} }


android { android {
buildToolsVersion '28.0.3'
compileSdkVersion 26 compileSdkVersion 26


defaultConfig { defaultConfig {
versionName "1.52-dev" versionName "1.52-dev"
} }


externalNativeBuild {
ndkBuild {
path "jni/Android.mk"
}
}

sourceSets { sourceSets {
main { main {
manifest.srcFile 'AndroidManifest.xml' manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src'] java.srcDirs = ['src']
res.srcDirs = ['res'] res.srcDirs = ['res']
jniLibs.srcDir 'libs'
} }
androidTest.setRoot('eSpeakTests') androidTest.setRoot('eSpeakTests')
androidTest { androidTest {

+ 0
- 3
android/jni/Application.mk View File

APP_OPTIM := release APP_OPTIM := release
APP_PLATFORM := android-26
APP_TOOLCHAIN_VERSION := 4.6.3
APP_ABI := armeabi-v7a x86

+ 0
- 3
configure.ac View File

AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_PROG_LN_S AC_PROG_LN_S


AC_CHECK_PROG(NDKBUILD_CHECK,[ndk-build],yes)

dnl ================================================================ dnl ================================================================
dnl gradle checks. dnl gradle checks.
dnl ================================================================ dnl ================================================================
PCAudioLib: ${have_pcaudiolib} PCAudioLib: ${have_pcaudiolib}


gradle (Android): ${GRADLE} gradle (Android): ${GRADLE}
ndk-build (Android): ${NDKBUILD_CHECK}


Klatt: ${have_klatt} Klatt: ${have_klatt}
speechPlayer: ${have_speechplayer} speechPlayer: ${have_speechplayer}

Loading…
Cancel
Save