2014-09-22 21:35:39 -04: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-04 10:49:43 -07:00
|
|
|
*/
|
|
|
|
|
2014-08-18 09:40:33 -04:00
|
|
|
buildscript {
|
2021-07-06 03:38:28 -03:00
|
|
|
apply from: 'cordova.gradle'
|
2021-03-27 12:11:56 -03:00
|
|
|
apply from: 'repositories.gradle'
|
2021-07-06 03:38:28 -03:00
|
|
|
|
2021-03-27 12:11:56 -03:00
|
|
|
repositories repos
|
2014-08-18 09:40:33 -04:00
|
|
|
|
2015-08-10 16:43:41 -07:00
|
|
|
dependencies {
|
2021-07-03 13:04:13 +09:00
|
|
|
// Android Gradle Plugin (AGP) Build Tools
|
2021-07-06 03:38:28 -03:00
|
|
|
classpath "com.android.tools.build:gradle:${cordovaConfig.AGP_VERSION}"
|
2014-08-18 09:40:33 -04:00
|
|
|
}
|
2022-05-18 23:18:33 +09:00
|
|
|
|
|
|
|
cdvHelpers.verifyCordovaConfigForBuild()
|
2014-08-18 09:40:33 -04:00
|
|
|
}
|
|
|
|
|
2019-04-06 13:33:04 +09:00
|
|
|
allprojects {
|
2021-08-02 14:19:40 +09:00
|
|
|
def hasRepositoriesGradle = file('repositories.gradle').exists()
|
|
|
|
if (hasRepositoriesGradle) {
|
|
|
|
apply from: 'repositories.gradle'
|
|
|
|
} else {
|
|
|
|
apply from: "${project.rootDir}/repositories.gradle"
|
|
|
|
}
|
|
|
|
|
2021-03-27 12:11:56 -03:00
|
|
|
repositories repos
|
2019-04-06 13:33:04 +09:00
|
|
|
}
|
|
|
|
|
2016-06-24 10:37:09 +05:30
|
|
|
apply plugin: 'com.android.library'
|
2017-02-13 16:37:39 -08:00
|
|
|
|
2014-08-18 09:40:33 -04:00
|
|
|
android {
|
2023-04-12 14:39:47 +09:00
|
|
|
namespace 'org.apache.cordova'
|
|
|
|
|
2022-05-18 23:18:33 +09:00
|
|
|
compileSdkVersion cordovaConfig.COMPILE_SDK_VERSION
|
2021-07-06 03:38:28 -03:00
|
|
|
buildToolsVersion cordovaConfig.BUILD_TOOLS_VERSION
|
2014-08-18 09:40:33 -04:00
|
|
|
|
|
|
|
compileOptions {
|
2017-11-15 11:39:32 -08:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
2014-08-18 09:40:33 -04:00
|
|
|
}
|
|
|
|
|
2020-11-18 18:48:46 +01:00
|
|
|
// For the Android Cordova Lib, we allow changing the minSdkVersion, but it is at the users own risk
|
2019-04-06 13:28:25 +09:00
|
|
|
defaultConfig {
|
2021-07-06 03:38:28 -03:00
|
|
|
minSdkVersion cordovaConfig.MIN_SDK_VERSION
|
2019-04-06 13:28:25 +09:00
|
|
|
}
|
|
|
|
|
2014-08-18 09:40:33 -04: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-13 16:37:39 -08:00
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE'
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
|
|
exclude 'META-INF/NOTICE'
|
|
|
|
}
|
2022-10-14 21:39:47 -07:00
|
|
|
|
|
|
|
publishing {
|
|
|
|
singleVariant('release') {
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
}
|
2017-02-13 16:37:39 -08:00
|
|
|
}
|
|
|
|
|
2021-04-15 23:52:14 +02:00
|
|
|
dependencies {
|
2022-10-14 21:39:47 -07:00
|
|
|
api "androidx.appcompat:appcompat:${cordovaConfig.ANDROIDX_APP_COMPAT_VERSION}"
|
2021-07-06 22:38:16 +09:00
|
|
|
implementation "androidx.webkit:webkit:${cordovaConfig.ANDROIDX_WEBKIT_VERSION}"
|
2022-06-30 10:49:10 +09:00
|
|
|
implementation "androidx.core:core-splashscreen:${cordovaConfig.ANDROIDX_CORE_SPLASHSCREEN_VERSION}"
|
2021-04-15 23:52:14 +02:00
|
|
|
}
|
|
|
|
|
2021-07-06 22:38:16 +09:00
|
|
|
/**
|
|
|
|
* In a project created though CLI, the `cordova-publish.gradle` file is not copied to the `framework` dir.
|
|
|
|
* App development (CLI) projects can not and should not publish our framework.
|
|
|
|
* In this case, there is no need for the gradle build process to know about the publish process.
|
|
|
|
*/
|
|
|
|
def cordovaPublishGradle = './cordova-publish.gradle'
|
|
|
|
if(file(cordovaPublishGradle).exists()) {
|
|
|
|
apply from: cordovaPublishGradle
|
2021-04-22 14:32:14 +02:00
|
|
|
}
|