build.gradle 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /* Licensed to the Apache Software Foundation (ASF) under one
  2. or more contributor license agreements. See the NOTICE file
  3. distributed with this work for additional information
  4. regarding copyright ownership. The ASF licenses this file
  5. to you under the Apache License, Version 2.0 (the
  6. "License"); you may not use this file except in compliance
  7. with the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing,
  10. software distributed under the License is distributed on an
  11. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  12. KIND, either express or implied. See the License for the
  13. specific language governing permissions and limitations
  14. under the License.
  15. */
  16. ext {
  17. apply from: 'cordova.gradle'
  18. cdvCompileSdkVersion = privateHelpers.getProjectTarget()
  19. cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
  20. }
  21. buildscript {
  22. repositories {
  23. google()
  24. jcenter()
  25. }
  26. dependencies {
  27. // The gradle plugin and the maven plugin have to be updated after each version of Android
  28. // studio comes out
  29. classpath 'com.android.tools.build:gradle:3.3.0'
  30. classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
  31. classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
  32. }
  33. }
  34. allprojects {
  35. repositories {
  36. google()
  37. jcenter()
  38. }
  39. }
  40. apply plugin: 'com.android.library'
  41. apply plugin: 'com.github.dcendents.android-maven'
  42. apply plugin: 'com.jfrog.bintray'
  43. group = 'org.apache.cordova'
  44. version = '8.1.0'
  45. android {
  46. compileSdkVersion cdvCompileSdkVersion
  47. buildToolsVersion cdvBuildToolsVersion
  48. compileOptions {
  49. sourceCompatibility JavaVersion.VERSION_1_8
  50. targetCompatibility JavaVersion.VERSION_1_8
  51. }
  52. // For the Android Cordova Lib, we will hardcode the minSdkVersion and not allow changes.
  53. defaultConfig {
  54. minSdkVersion 19
  55. }
  56. sourceSets {
  57. main {
  58. manifest.srcFile 'AndroidManifest.xml'
  59. java.srcDirs = ['src']
  60. resources.srcDirs = ['src']
  61. aidl.srcDirs = ['src']
  62. renderscript.srcDirs = ['src']
  63. res.srcDirs = ['res']
  64. assets.srcDirs = ['assets']
  65. }
  66. }
  67. packagingOptions {
  68. exclude 'META-INF/LICENSE'
  69. exclude 'META-INF/LICENSE.txt'
  70. exclude 'META-INF/DEPENDENCIES'
  71. exclude 'META-INF/NOTICE'
  72. }
  73. }
  74. install {
  75. repositories.mavenInstaller {
  76. pom {
  77. project {
  78. packaging 'aar'
  79. name 'Cordova'
  80. url 'https://cordova.apache.org'
  81. licenses {
  82. license {
  83. name 'The Apache Software License, Version 2.0'
  84. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  85. }
  86. }
  87. developers {
  88. developer {
  89. id 'stevengill'
  90. name 'Steve Gill'
  91. }
  92. }
  93. scm {
  94. connection 'scm:git:https://github.com/apache/cordova-android.git'
  95. developerConnection 'scm:git:git@github.com:apache/cordova-android.git'
  96. url 'https://github.com/apache/cordova-android'
  97. }
  98. }
  99. }
  100. }
  101. }
  102. task sourcesJar(type: Jar) {
  103. from android.sourceSets.main.java.srcDirs
  104. classifier = 'sources'
  105. }
  106. artifacts {
  107. archives sourcesJar
  108. }
  109. bintray {
  110. user = System.getenv('BINTRAY_USER')
  111. key = System.getenv('BINTRAY_KEY')
  112. configurations = ['archives']
  113. pkg {
  114. repo = 'maven'
  115. name = 'cordova-android'
  116. userOrg = 'cordova'
  117. licenses = ['Apache-2.0']
  118. vcsUrl = 'https://github.com/apache/cordova-android'
  119. websiteUrl = 'https://cordova.apache.org'
  120. issueTrackerUrl = 'https://github.com/apache/cordova-android/issues'
  121. publicDownloadNumbers = true
  122. licenses = ['Apache-2.0']
  123. labels = ['android', 'cordova', 'phonegap']
  124. version {
  125. name = '8.1.0'
  126. released = new Date()
  127. vcsTag = '8.1.0'
  128. }
  129. }
  130. }