2014-09-23 09:35:39 +08:00
|
|
|
/* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
or more contributor license agreements. See the NOTICE file
|
|
|
|
distributed with this work for additional information
|
|
|
|
regarding copyright ownership. The ASF licenses this file
|
|
|
|
to you under the Apache License, Version 2.0 (the
|
|
|
|
"License"); you may not use this file except in compliance
|
|
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
|
|
software distributed under the License is distributed on an
|
|
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
KIND, either express or implied. See the License for the
|
|
|
|
specific language governing permissions and limitations
|
|
|
|
under the License.
|
2014-09-05 01:49:43 +08:00
|
|
|
*/
|
|
|
|
|
2017-02-15 08:31:27 +08:00
|
|
|
ext {
|
|
|
|
apply from: 'cordova.gradle'
|
|
|
|
cdvCompileSdkVersion = privateHelpers.getProjectTarget()
|
|
|
|
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
|
2020-11-19 01:48:46 +08:00
|
|
|
if (project.hasProperty('cdvMinSdkVersion') && cdvMinSdkVersion.isInteger()) {
|
|
|
|
cdvMinSdkVersion = cdvMinSdkVersion as int
|
|
|
|
println '[Cordova] cdvMinSdkVersion is overridden, try it at your own risk.'
|
|
|
|
} else {
|
|
|
|
cdvMinSdkVersion = 22; // current Cordova's default
|
|
|
|
}
|
2021-04-19 06:30:06 +08:00
|
|
|
|
|
|
|
if (project.hasProperty('cdvAndroidXAppCompatVersion')) {
|
|
|
|
cdvAndroidXAppCompatVersion = cdvAndroidXAppCompatVersion
|
|
|
|
println '[Cordova] cdvAndroidXAppCompatVersion is overridden, try it at your own risk.'
|
|
|
|
} else {
|
|
|
|
cdvAndroidXAppCompatVersion = "1.2.0"; // current Cordova's default
|
|
|
|
}
|
2017-02-15 08:31:27 +08:00
|
|
|
}
|
|
|
|
|
2014-08-18 21:40:33 +08:00
|
|
|
buildscript {
|
2021-03-27 23:11:56 +08:00
|
|
|
apply from: 'repositories.gradle'
|
|
|
|
repositories repos
|
2014-08-18 21:40:33 +08:00
|
|
|
|
2015-08-11 07:43:41 +08:00
|
|
|
dependencies {
|
2018-04-05 04:54:39 +08:00
|
|
|
// The gradle plugin and the maven plugin have to be updated after each version of Android
|
|
|
|
// studio comes out
|
2021-07-01 15:50:39 +08:00
|
|
|
classpath 'com.android.tools.build:gradle:4.2.1'
|
2018-09-26 15:29:31 +08:00
|
|
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
2021-04-13 17:10:07 +08:00
|
|
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
|
2014-08-18 21:40:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-06 12:33:04 +08:00
|
|
|
allprojects {
|
2021-03-27 23:11:56 +08:00
|
|
|
apply from: 'repositories.gradle'
|
|
|
|
repositories repos
|
2019-04-06 12:33:04 +08:00
|
|
|
}
|
|
|
|
|
2016-06-24 13:07:09 +08:00
|
|
|
apply plugin: 'com.android.library'
|
2017-02-14 08:37:39 +08:00
|
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
|
|
|
apply plugin: 'com.jfrog.bintray'
|
2014-08-18 21:40:33 +08:00
|
|
|
|
2017-02-14 08:37:39 +08:00
|
|
|
group = 'org.apache.cordova'
|
2021-04-13 14:34:00 +08:00
|
|
|
version = '10.0.0-dev'
|
2017-02-14 08:37:39 +08:00
|
|
|
|
2014-08-18 21:40:33 +08:00
|
|
|
android {
|
2015-01-07 04:56:09 +08:00
|
|
|
compileSdkVersion cdvCompileSdkVersion
|
|
|
|
buildToolsVersion cdvBuildToolsVersion
|
2014-08-18 21:40:33 +08:00
|
|
|
|
|
|
|
compileOptions {
|
2017-11-16 03:39:32 +08:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
2014-08-18 21:40:33 +08:00
|
|
|
}
|
|
|
|
|
2020-11-19 01:48:46 +08:00
|
|
|
// For the Android Cordova Lib, we allow changing the minSdkVersion, but it is at the users own risk
|
2019-04-06 12:28:25 +08:00
|
|
|
defaultConfig {
|
2020-11-19 01:48:46 +08:00
|
|
|
minSdkVersion cdvMinSdkVersion
|
2019-04-06 12:28:25 +08:00
|
|
|
}
|
|
|
|
|
2014-08-18 21:40:33 +08:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
|
|
java.srcDirs = ['src']
|
|
|
|
resources.srcDirs = ['src']
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
renderscript.srcDirs = ['src']
|
|
|
|
res.srcDirs = ['res']
|
|
|
|
assets.srcDirs = ['assets']
|
|
|
|
}
|
|
|
|
}
|
2017-02-14 08:37:39 +08:00
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
install {
|
|
|
|
repositories.mavenInstaller {
|
|
|
|
pom {
|
|
|
|
project {
|
|
|
|
packaging 'aar'
|
|
|
|
name 'Cordova'
|
|
|
|
url 'https://cordova.apache.org'
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name 'The Apache Software License, Version 2.0'
|
|
|
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
developers {
|
|
|
|
developer {
|
2017-02-15 08:31:27 +08:00
|
|
|
id 'stevengill'
|
|
|
|
name 'Steve Gill'
|
2017-02-14 08:37:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
scm {
|
2018-09-26 15:29:31 +08:00
|
|
|
connection 'scm:git:https://github.com/apache/cordova-android.git'
|
|
|
|
developerConnection 'scm:git:git@github.com:apache/cordova-android.git'
|
|
|
|
url 'https://github.com/apache/cordova-android'
|
2017-02-14 08:37:39 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
from android.sourceSets.main.java.srcDirs
|
|
|
|
classifier = 'sources'
|
|
|
|
}
|
|
|
|
|
2021-04-16 05:52:14 +08:00
|
|
|
dependencies {
|
2021-04-19 06:30:06 +08:00
|
|
|
implementation "androidx.appcompat:appcompat:$cdvAndroidXAppCompatVersion"
|
2021-04-16 05:52:14 +08:00
|
|
|
}
|
|
|
|
|
2017-02-14 08:37:39 +08:00
|
|
|
artifacts {
|
|
|
|
archives sourcesJar
|
|
|
|
}
|
|
|
|
|
|
|
|
bintray {
|
|
|
|
user = System.getenv('BINTRAY_USER')
|
|
|
|
key = System.getenv('BINTRAY_KEY')
|
|
|
|
configurations = ['archives']
|
|
|
|
pkg {
|
2017-02-15 08:31:27 +08:00
|
|
|
repo = 'maven'
|
|
|
|
name = 'cordova-android'
|
|
|
|
userOrg = 'cordova'
|
2017-02-14 08:37:39 +08:00
|
|
|
licenses = ['Apache-2.0']
|
2018-09-26 15:29:31 +08:00
|
|
|
vcsUrl = 'https://github.com/apache/cordova-android'
|
2017-02-14 08:37:39 +08:00
|
|
|
websiteUrl = 'https://cordova.apache.org'
|
2018-09-26 15:29:31 +08:00
|
|
|
issueTrackerUrl = 'https://github.com/apache/cordova-android/issues'
|
2017-02-14 08:37:39 +08:00
|
|
|
publicDownloadNumbers = true
|
|
|
|
licenses = ['Apache-2.0']
|
|
|
|
labels = ['android', 'cordova', 'phonegap']
|
|
|
|
version {
|
2021-04-13 14:34:00 +08:00
|
|
|
name = '10.0.0-dev'
|
2020-11-19 01:48:46 +08:00
|
|
|
released = new Date()
|
2021-04-13 14:34:00 +08:00
|
|
|
vcsTag = '10.0.0-dev'
|
2017-02-14 08:37:39 +08:00
|
|
|
}
|
|
|
|
}
|
2014-08-18 21:40:33 +08:00
|
|
|
}
|
2021-04-22 20:32:14 +08:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation 'androidx.webkit:webkit:1.3.0'
|
|
|
|
}
|