mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
feat!: drop abandoned com.github.dcendents:android-maven-gradle-plugin (#1252)
* feat: use maven-publish plugin (mavenCentral) * fix: Apache License url * fix: framework build failure without useAndroidX * fix: add aar build artifact
This commit is contained in:
parent
510596f515
commit
69b24dbf6a
@ -29,9 +29,6 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
// Android Gradle Plugin (AGP) Build Tools
|
// Android Gradle Plugin (AGP) Build Tools
|
||||||
classpath "com.android.tools.build:gradle:${cordovaConfig.AGP_VERSION}"
|
classpath "com.android.tools.build:gradle:${cordovaConfig.AGP_VERSION}"
|
||||||
|
|
||||||
// @todo remove this abandoned plugin. maven-publish-plugin is now supported by Android Gradle plugin 3.6.0 and higher
|
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,12 +38,7 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
// @todo remove this abandoned plugin. maven-publish-plugin is now supported by Android Gradle plugin 3.6.0 and higher
|
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
|
||||||
|
|
||||||
group = 'org.apache.cordova'
|
|
||||||
version = '10.0.0-dev'
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion cordovaConfig.SDK_VERSION
|
compileSdkVersion cordovaConfig.SDK_VERSION
|
||||||
@ -82,50 +74,59 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo after removing abandoned plugin "com.github.dcendents.android-maven". figure out what to do with this.
|
task sourcesJar(type: Jar) {
|
||||||
install {
|
from android.sourceSets.main.java.srcDirs
|
||||||
repositories.mavenInstaller {
|
classifier = 'sources'
|
||||||
pom {
|
}
|
||||||
project {
|
|
||||||
packaging 'aar'
|
publishing {
|
||||||
name 'Cordova'
|
publications {
|
||||||
url 'https://cordova.apache.org'
|
Cordova(MavenPublication) {
|
||||||
|
groupId = 'org.apache.cordova'
|
||||||
|
artifactId = 'framework'
|
||||||
|
version = '10.0.0-dev'
|
||||||
|
|
||||||
|
artifact(sourcesJar)
|
||||||
|
artifact("$buildDir/outputs/aar/framework-release.aar")
|
||||||
|
|
||||||
|
pom {
|
||||||
|
name = 'Cordova'
|
||||||
|
description = 'A library to build Cordova-based projects for the Android platform.'
|
||||||
|
url = 'https://cordova.apache.org'
|
||||||
|
|
||||||
licenses {
|
licenses {
|
||||||
license {
|
license {
|
||||||
name 'The Apache Software License, Version 2.0'
|
name = 'Apache License, Version 2.0'
|
||||||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
id 'stevengill'
|
id = 'stevengill'
|
||||||
name 'Steve Gill'
|
name = 'Steve Gill'
|
||||||
|
}
|
||||||
|
developer {
|
||||||
|
id = 'erisu'
|
||||||
|
name = 'Bryan Ellis'
|
||||||
|
email = 'erisu@apache.org'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scm {
|
|
||||||
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'
|
|
||||||
|
|
||||||
|
scm {
|
||||||
|
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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
|
||||||
from android.sourceSets.main.java.srcDirs
|
|
||||||
classifier = 'sources'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "androidx.appcompat:appcompat:${cordovaConfig.ANDROIDX_APP_COMPAT_VERSION}"
|
implementation "androidx.appcompat:appcompat:${cordovaConfig.ANDROIDX_APP_COMPAT_VERSION}"
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'androidx.webkit:webkit:1.3.0'
|
implementation 'androidx.webkit:webkit:1.3.0'
|
||||||
}
|
}
|
||||||
|
19
framework/gradle.properties
Normal file
19
framework/gradle.properties
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
|
# IDE (e.g. Android Studio) users:
|
||||||
|
# Gradle settings configured through the IDE *will override*
|
||||||
|
# any settings specified in this file.
|
||||||
|
|
||||||
|
# For more details on how to configure your build environment visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
|
||||||
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
org.gradle.jvmargs=-Xmx1536m
|
||||||
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
||||||
|
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
|
# org.gradle.parallel=true
|
Loading…
Reference in New Issue
Block a user