Skip to content

Commit

Permalink
feat: use maven-publish plugin (mavenCentral)
Browse files Browse the repository at this point in the history
  • Loading branch information
erisu committed Jul 2, 2021
1 parent 8f9ad2c commit a9b4e8e
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ buildscript {
dependencies {
// Android Gradle Plugin (AGP) Build Tools
classpath 'com.android.tools.build:gradle:4.2.1'

// @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'
}
}

Expand All @@ -54,9 +51,7 @@ allprojects {
}

apply plugin: 'com.android.library'

// @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'
apply plugin: 'maven-publish'

group = 'org.apache.cordova'
version = '10.0.0-dev'
Expand Down Expand Up @@ -95,50 +90,58 @@ android {
}
}

// @todo after removing abandoned plugin "com.github.dcendents.android-maven". figure out what to do with this.
install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'Cordova'
url 'https://cordova.apache.org'
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

publishing {
publications {
Cordova(MavenPublication) {
groupId = 'org.apache.cordova'
artifactId = 'framework'
version = '10.0.0-dev'

artifact(sourcesJar)

pom {
name = 'Cordova'
description = 'A library to build Cordova-based projects for the Android platform.'
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'
name = 'Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txts'
}
}

developers {
developer {
id 'stevengill'
name 'Steve Gill'
id = 'stevengill'
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 {
implementation "androidx.appcompat:appcompat:$cdvAndroidXAppCompatVersion"
}

artifacts {
archives sourcesJar
}

dependencies {
implementation 'androidx.webkit:webkit:1.3.0'
}

0 comments on commit a9b4e8e

Please sign in to comment.