mirror of
https://github.com/revanced/smali.git
synced 2025-05-27 19:30:13 +02:00
Switch from the maven plugin to the maven-publish plugin
This commit is contained in:
parent
53b52f023d
commit
c03e4bf7f8
@ -71,12 +71,16 @@ task fatJar(type: Jar) {
|
||||
}
|
||||
tasks.getByPath('build').dependsOn(fatJar)
|
||||
|
||||
uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
pom.project {
|
||||
description 'baksmali is a disassembler for dalvik bytecode'
|
||||
scm {
|
||||
url 'https://github.com/JesusFreke/smali/tree/master/baksmali'
|
||||
publish {
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
pom {
|
||||
description = 'baksmali is a disassembler for dalvik bytecode'
|
||||
scm {
|
||||
url = 'https://github.com/JesusFreke/smali/tree/master/baksmali'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
108
build.gradle
108
build.gradle
@ -107,72 +107,74 @@ subprojects {
|
||||
}
|
||||
|
||||
if (project.name in maven_release_projects) {
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
group = 'org.smali'
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from 'build/docs/javadoc'
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allJava
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
}
|
||||
|
||||
signing {
|
||||
required { gradle.taskGraph.hasTask('uploadArchives') }
|
||||
sign configurations.archives
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
configuration = configurations.archives
|
||||
|
||||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||
|
||||
if (rootProject.hasProperty('sonatypeUsername') && rootProject.hasProperty('sonatypePassword')) {
|
||||
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
|
||||
authentication(userName: sonatypeUsername, password: sonatypePassword)
|
||||
}
|
||||
}
|
||||
|
||||
pom.artifactId = project.name
|
||||
|
||||
pom.project {
|
||||
name project.name
|
||||
url 'http://smali.org'
|
||||
packaging 'jar'
|
||||
licenses {
|
||||
license {
|
||||
name 'The BSD 3-Clause License'
|
||||
url 'http://opensource.org/licenses/BSD-3-Clause'
|
||||
distribution 'repo'
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifactId = project.name
|
||||
from components.java
|
||||
versionMapping {
|
||||
usage('java-api') {
|
||||
fromResolutionOf('runtimeClasspath')
|
||||
}
|
||||
usage('java-runtime') {
|
||||
fromResolutionResult()
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection 'scm:git:git://github.com/JesusFreke/smali.git'
|
||||
developerConnection 'scm:git:git@github.com:JesusFreke/smali.git'
|
||||
|
||||
pom {
|
||||
name = project.name
|
||||
url = 'http://smali.org'
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name = 'The BSD 3-Clause License'
|
||||
url = 'http://opensource.org/licenses/BSD-3-Clause'
|
||||
distribution = 'repo'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:git://github.com/JesusFreke/smali.git'
|
||||
developerConnection = 'scm:git:git@github.com:JesusFreke/smali.git'
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = 'jesusfreke'
|
||||
name = 'Ben Gruver'
|
||||
email = 'jesusfreke@jesusfreke.com'
|
||||
}
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id 'jesusfreke'
|
||||
name 'Ben Gruver'
|
||||
email 'jesusfreke@jesusfreke.com'
|
||||
}
|
||||
}
|
||||
if (rootProject.hasProperty('sonatypeUsername') && rootProject.hasProperty('sonatypePassword')) {
|
||||
repositories {
|
||||
maven {
|
||||
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
credentials {
|
||||
username sonatypeUsername
|
||||
password sonatypePassword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.getByPath(':release').dependsOn(uploadArchives)
|
||||
signing {
|
||||
required { gradle.taskGraph.hasTask('publish') }
|
||||
sign(publishing.publications["mavenJava"])
|
||||
}
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks.getByPath(':release').dependsOn(publish)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,12 +93,16 @@ task generateAccessorTestDex(type: JavaExec, dependsOn: compileAccessorTestJava)
|
||||
args sourceSets.accessorTest.output.classesDirs
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
pom.project {
|
||||
description 'dexlib2 is a library for reading/modifying/writing Android dex files'
|
||||
scm {
|
||||
url 'https://github.com/JesusFreke/smali/tree/master/dexlib2'
|
||||
publish {
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
pom {
|
||||
description = 'dexlib2 is a library for reading/modifying/writing Android dex files'
|
||||
scm {
|
||||
url = 'https://github.com/JesusFreke/smali/tree/master/dexlib2'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -119,12 +119,16 @@ jflex {
|
||||
generateDir = new File(generateDir, 'org/jf/smali')
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
pom.project {
|
||||
description 'smali is an assembler for dalvik bytecode'
|
||||
scm {
|
||||
url 'https://github.com/JesusFreke/smali/tree/master/smali'
|
||||
publish {
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
pom {
|
||||
description = 'smali is an assembler for dalvik bytecode'
|
||||
scm {
|
||||
url = 'https://github.com/JesusFreke/smali/tree/master/smali'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,12 +37,16 @@ dependencies {
|
||||
testImplementation depends.junit
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories.mavenDeployer {
|
||||
pom.project {
|
||||
description 'This library contains random utilities used by smali/baksmali/dexlib2'
|
||||
scm {
|
||||
url 'https://github.com/JesusFreke/smali/tree/master/util'
|
||||
publish {
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
pom {
|
||||
description = 'This library contains random utilities used by smali/baksmali/dexlib2'
|
||||
scm {
|
||||
url = 'https://github.com/JesusFreke/smali/tree/master/util'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user