You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.5KB

  1. /*
  2. * Copyright (C) 2014 Andrew Comminos
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. buildscript {
  18. repositories {
  19. jcenter()
  20. }
  21. dependencies {
  22. classpath 'com.android.tools.build:gradle:2.2.3'
  23. }
  24. }
  25. apply plugin: 'com.android.library'
  26. repositories {
  27. jcenter()
  28. }
  29. dependencies {
  30. compile 'com.android.support:support-v4:21.+'
  31. compile 'com.google.protobuf:protobuf-java:3.0.0'
  32. compile 'com.madgag.spongycastle:core:1.51.0.0'
  33. // Custom PKCS12 keybag parse modifications to support Mumble unencrypted certificates
  34. // Source: https://github.com/Morlunk/spongycastle/tree/pkcs12-keybag-fixes
  35. compile files('libs/sc-morlunk-prov-1.51.0.0.jar', 'libs/sc-morlunk-pkix-1.51.0.0.jar')
  36. compile 'com.googlecode.javacpp:javacpp:0.7'
  37. compile 'com.intellij:annotations:+@jar'
  38. }
  39. android {
  40. compileSdkVersion 21
  41. buildToolsVersion "21.1.1"
  42. sourceSets.main.jniLibs.srcDir 'src/main/libs/'
  43. sourceSets.main.jni.srcDirs = [] // Disable NDK build support until it supports multiple modules.
  44. defaultConfig {
  45. testApplicationId "com.morlunk.jumble.test"
  46. testInstrumentationRunner "android.test.InstrumentationTestRunner"
  47. minSdkVersion 9
  48. targetSdkVersion 19
  49. // ndk {
  50. // abiFilters "armeabi", "armeabi-v7a", "x86"
  51. // stl "gnustl_static"
  52. // cFlags "-I\$(LOCAL_PATH)/speex/include/ -I\$(LOCAL_PATH)/celt-0.11.0-src/include/ -I\$(LOCAL_PATH)/celt-0.7.0-src/include/ -I\$(LOCAL_PATH)/opus/include -D__EMX__ -DUSE_KISS_FFT -DFIXED_POINT -DEXPORT='' -DHAVE_CONFIG_H -fvisibility=hidden -DOPUS_BUILD -DVAR_ARRAYS -Wno-traditional -DFIXED_POINT"
  53. // }
  54. }
  55. // Trigger NDK build on java compilation task.
  56. task ndkBuild(type: Exec) {
  57. commandLine 'ndk-build', '-C', file('src/main/jni/').absolutePath
  58. }
  59. tasks.withType(JavaCompile) {
  60. compileTask -> compileTask.dependsOn ndkBuild
  61. }
  62. }