-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update project build
- Loading branch information
Showing
68 changed files
with
261 additions
and
5,415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,53 +16,43 @@ | |
under the License. | ||
*/ | ||
|
||
ext { | ||
buildscript { | ||
apply from: 'cordova.gradle' | ||
cdvCompileSdkVersion = privateHelpers.getProjectTarget() | ||
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() | ||
} | ||
apply from: 'repositories.gradle' | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
repositories repos | ||
|
||
dependencies { | ||
// The gradle plugin and the maven plugin have to be updated after each version of Android | ||
// studio comes out | ||
classpath 'com.android.tools.build:gradle:4.0.0' | ||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' | ||
// Android Gradle Plugin (AGP) Build Tools | ||
classpath "com.android.tools.build:gradle:${cordovaConfig.AGP_VERSION}" | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
jcenter() | ||
def hasRepositoriesGradle = file('repositories.gradle').exists() | ||
if (hasRepositoriesGradle) { | ||
apply from: 'repositories.gradle' | ||
} else { | ||
apply from: "${project.rootDir}/repositories.gradle" | ||
} | ||
|
||
repositories repos | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
group = 'org.apache.cordova' | ||
version = '9.0.0' | ||
|
||
android { | ||
compileSdkVersion cdvCompileSdkVersion | ||
buildToolsVersion cdvBuildToolsVersion | ||
compileSdkVersion cordovaConfig.SDK_VERSION | ||
buildToolsVersion cordovaConfig.BUILD_TOOLS_VERSION | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
// For the Android Cordova Lib, we will hardcode the minSdkVersion and not allow changes. | ||
// For the Android Cordova Lib, we allow changing the minSdkVersion, but it is at the users own risk | ||
defaultConfig { | ||
minSdkVersion 22 | ||
minSdkVersion cordovaConfig.MIN_SDK_VERSION | ||
} | ||
|
||
sourceSets { | ||
|
@@ -85,64 +75,17 @@ android { | |
} | ||
} | ||
|
||
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 { | ||
id 'stevengill' | ||
name 'Steve Gill' | ||
} | ||
} | ||
scm { | ||
connection 'scm:git:https://github.com/apache/cordova-android.git' | ||
developerConnection 'scm:git:[email protected]:apache/cordova-android.git' | ||
url 'https://github.com/apache/cordova-android' | ||
|
||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
classifier = 'sources' | ||
dependencies { | ||
implementation "androidx.appcompat:appcompat:${cordovaConfig.ANDROIDX_APP_COMPAT_VERSION}" | ||
implementation "androidx.webkit:webkit:${cordovaConfig.ANDROIDX_WEBKIT_VERSION}" | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
} | ||
|
||
bintray { | ||
user = System.getenv('BINTRAY_USER') | ||
key = System.getenv('BINTRAY_KEY') | ||
configurations = ['archives'] | ||
pkg { | ||
repo = 'maven' | ||
name = 'cordova-android' | ||
userOrg = 'cordova' | ||
licenses = ['Apache-2.0'] | ||
vcsUrl = 'https://github.com/apache/cordova-android' | ||
websiteUrl = 'https://cordova.apache.org' | ||
issueTrackerUrl = 'https://github.com/apache/cordova-android/issues' | ||
publicDownloadNumbers = true | ||
licenses = ['Apache-2.0'] | ||
labels = ['android', 'cordova', 'phonegap'] | ||
version { | ||
name = '9.0.0' | ||
released = new Date() | ||
vcsTag = '9.0.0' | ||
} | ||
} | ||
/** | ||
* 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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# GENERATED FILE! DO NOT EDIT! | ||
|
||
# This file was originally created by the Android Tools, but is now | ||
# used by cordova-android to manage the project configuration. | ||
|
||
# Indicates whether an apk should be generated for each density. | ||
split.density=false | ||
|
||
# Project target. | ||
target=android-29 | ||
apk-configurations= | ||
renderscript.opt.level=O0 | ||
android.library=true | ||
target=android-29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* 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. | ||
*/ | ||
|
||
ext.repos = { | ||
google() | ||
mavenCentral() | ||
jcenter() | ||
} |
Oops, something went wrong.