Advertisement
Guest User

Untitled

a guest
Jun 8th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. jcenter()
  4. google()
  5. }
  6.  
  7. dependencies {
  8. classpath 'com.android.tools.build:gradle:3.1.2'
  9. }
  10. }
  11.  
  12. allprojects {
  13. repositories {
  14. jcenter()
  15. google()
  16. maven { url "https://jitpack.io" }
  17. }
  18. }
  19.  
  20. apply plugin: 'com.android.application'
  21.  
  22. android {
  23. /*******************************************************
  24. * The following variables:
  25. * - androidBuildToolsVersion,
  26. * - androidCompileSdkVersion
  27. * - qt5AndroidDir - holds the path to qt android files
  28. * needed to build any Qt application
  29. * on Android.
  30. *
  31. * are defined in gradle.properties file. This file is
  32. * updated by QtCreator and androiddeployqt tools.
  33. * Changing them manually might break the compilation!
  34. *******************************************************/
  35.  
  36. //compileSdkVersion androidCompileSdkVersion.toInteger()
  37. compileSdkVersion 26
  38.  
  39. // androidBuildToolsVersion
  40. buildToolsVersion "26.0.2"
  41.  
  42. sourceSets {
  43. main {
  44. manifest.srcFile 'AndroidManifest.xml'
  45. java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
  46. aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
  47. res.srcDirs = [qt5AndroidDir + '/res', 'res']
  48. resources.srcDirs = ['src']
  49. renderscript.srcDirs = ['src']
  50. assets.srcDirs = ['assets']
  51. jniLibs.srcDirs = ['libs']
  52. }
  53. }
  54.  
  55. lintOptions {
  56. abortOnError false
  57. }
  58. }
  59.  
  60. dependencies {
  61. compile fileTree(dir: 'libs', include: ['*.jar'])
  62. compile 'com.github.felHR85:UsbSerial:4.5.2'
  63. implementation 'com.android.support:appcompat-v7:27.0.2'
  64. implementation 'com.android.support:design:27.0.2'
  65. implementation 'com.android.support.constraint:constraint-layout:1.1.0'
  66. implementation 'android.arch.lifecycle:extensions:1.0.0'
  67. /*testImplementation 'junit:junit:4.12'
  68. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  69. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'*/
  70. }
  71.  
  72. // beware! the following fix is necessary for gradle 4+, but an upstream fix is to be expected in the future.
  73. // Try removing the following lines if the apk is not found by QtCreator.
  74. // see also: https://bugreports.qt.io/browse/QTCREATORBUG-19553
  75. android {
  76. applicationVariants.all {
  77. variant -> variant.outputs.all {
  78. outputFileName = "../" + outputFileName
  79. }
  80. }
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement