Без опису

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. if (project.hasProperty('cdvMinSdkVersion') && cdvMinSdkVersion.isInteger()) {
  21. cdvMinSdkVersion = cdvMinSdkVersion as int
  22. println '[Cordova] cdvMinSdkVersion is overridden, try it at your own risk.'
  23. } else {
  24. cdvMinSdkVersion = 22; // current Cordova's default
  25. }
  26. }
  27. buildscript {
  28. apply from: 'repositories.gradle'
  29. repositories repos
  30. dependencies {
  31. // The gradle plugin and the maven plugin have to be updated after each version of Android
  32. // studio comes out
  33. classpath 'com.android.tools.build:gradle:4.0.0'
  34. classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
  35. classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
  36. }
  37. }
  38. allprojects {
  39. apply from: 'repositories.gradle'
  40. repositories repos
  41. }
  42. apply plugin: 'com.android.library'
  43. apply plugin: 'com.github.dcendents.android-maven'
  44. apply plugin: 'com.jfrog.bintray'
  45. group = 'org.apache.cordova'
  46. version = '9.1.0'
  47. android {
  48. compileSdkVersion cdvCompileSdkVersion
  49. buildToolsVersion cdvBuildToolsVersion
  50. compileOptions {
  51. sourceCompatibility JavaVersion.VERSION_1_8
  52. targetCompatibility JavaVersion.VERSION_1_8
  53. }
  54. // For the Android Cordova Lib, we allow changing the minSdkVersion, but it is at the users own risk
  55. defaultConfig {
  56. minSdkVersion cdvMinSdkVersion
  57. }
  58. sourceSets {
  59. main {
  60. manifest.srcFile 'AndroidManifest.xml'
  61. java.srcDirs = ['src']
  62. resources.srcDirs = ['src']
  63. aidl.srcDirs = ['src']
  64. renderscript.srcDirs = ['src']
  65. res.srcDirs = ['res']
  66. assets.srcDirs = ['assets']
  67. }
  68. }
  69. packagingOptions {
  70. exclude 'META-INF/LICENSE'
  71. exclude 'META-INF/LICENSE.txt'
  72. exclude 'META-INF/DEPENDENCIES'
  73. exclude 'META-INF/NOTICE'
  74. }
  75. }
  76. install {
  77. repositories.mavenInstaller {
  78. pom {
  79. project {
  80. packaging 'aar'
  81. name 'Cordova'
  82. url 'https://cordova.apache.org'
  83. licenses {
  84. license {
  85. name 'The Apache Software License, Version 2.0'
  86. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  87. }
  88. }
  89. developers {
  90. developer {
  91. id 'stevengill'
  92. name 'Steve Gill'
  93. }
  94. }
  95. scm {
  96. connection 'scm:git:https://github.com/apache/cordova-android.git'
  97. developerConnection 'scm:git:git@github.com:apache/cordova-android.git'
  98. url 'https://github.com/apache/cordova-android'
  99. }
  100. }
  101. }
  102. }
  103. }
  104. task sourcesJar(type: Jar) {
  105. from android.sourceSets.main.java.srcDirs
  106. classifier = 'sources'
  107. }
  108. artifacts {
  109. archives sourcesJar
  110. }
  111. bintray {
  112. user = System.getenv('BINTRAY_USER')
  113. key = System.getenv('BINTRAY_KEY')
  114. configurations = ['archives']
  115. pkg {
  116. repo = 'maven'
  117. name = 'cordova-android'
  118. userOrg = 'cordova'
  119. licenses = ['Apache-2.0']
  120. vcsUrl = 'https://github.com/apache/cordova-android'
  121. websiteUrl = 'https://cordova.apache.org'
  122. issueTrackerUrl = 'https://github.com/apache/cordova-android/issues'
  123. publicDownloadNumbers = true
  124. licenses = ['Apache-2.0']
  125. labels = ['android', 'cordova', 'phonegap']
  126. version {
  127. name = '9.1.0'
  128. released = new Date()
  129. vcsTag = '9.1.0'
  130. }
  131. }
  132. }