build: add maven publish

This commit is contained in:
Skylot 2021-12-19 16:24:09 +00:00
parent 01f47282ed
commit 4bd8e26ae7
No known key found for this signature in database
GPG Key ID: 1E23F5B52567AA39
14 changed files with 91 additions and 21 deletions

View File

@ -10,7 +10,6 @@ println("jadx version: ${jadxVersion}")
allprojects {
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
version = jadxVersion
@ -27,14 +26,6 @@ allprojects {
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.32'
compileOnly 'org.jetbrains:annotations:23.0.0'

3
buildSrc/build.gradle Normal file
View File

@ -0,0 +1,3 @@
plugins {
id 'groovy-gradle-plugin'
}

View File

@ -0,0 +1,76 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = 'io.github.skylot'
version = jadxVersion
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = project.name
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = project.name
description = 'Dex to Java decompiler'
url = 'https://github.com/skylot/jadx'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'skylot'
name = 'Skylot'
email = 'skylot@gmail.com'
url = 'https://github.com/skylot'
}
}
scm {
connection = 'scm:git:git://github.com/skylot/jadx.git'
developerConnection = 'scm:git:ssh://github.com:skylot/jadx.git'
url = 'https://github.com/skylot/jadx'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = uri('https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/')
def snapshotsRepoUrl = uri('https://s01.oss.sonatype.org/content/repositories/snapshots/')
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.properties['ossrhUser'].toString()
password = project.properties['ossrhPassword'].toString()
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}

View File

@ -1,5 +1,5 @@
plugins {
id 'java-library'
id 'jadx-library'
}
dependencies {

View File

@ -251,8 +251,8 @@ public class SignatureParser {
/**
* Map of generic types names to extends classes.
* <p/>
* Example: "<T:Ljava/lang/Exception;:Ljava/lang/Object;>"
* <p>
* Example: "&lt;T:Ljava/lang/Exception;:Ljava/lang/Object;&gt;"
*/
@SuppressWarnings("ConditionalBreakInInfiniteLoop")
public List<ArgType> consumeGenericTypeParameters() {

View File

@ -20,7 +20,7 @@ import java.io.DataInput;
import java.io.IOException;
/**
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
* @author Ryszard Wiśniewski "brut.alll@gmail.com"
*/
public abstract class DataInputDelegate implements DataInput {
protected final DataInput mDelegate;

View File

@ -22,7 +22,7 @@ import java.io.IOException;
import java.io.InputStream;
/**
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
* @author Ryszard Wiśniewski "brut.alll@gmail.com"
*/
public class ExtDataInput extends DataInputDelegate {
public ExtDataInput(InputStream in) {

View File

@ -27,7 +27,7 @@ import javax.imageio.ImageIO;
import jadx.core.utils.exceptions.JadxRuntimeException;
/**
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
* @author Ryszard Wiśniewski "brut.alll@gmail.com"
*/
public class Res9patchStreamDecoder {

View File

@ -1,5 +1,5 @@
plugins {
id 'java-library'
id 'jadx-library'
}
dependencies {

View File

@ -1,5 +1,5 @@
plugins {
id 'java-library'
id 'jadx-library'
}
dependencies {

View File

@ -1,5 +1,5 @@
plugins {
id 'java-library'
id 'jadx-library'
}
dependencies {

View File

@ -1,3 +1,3 @@
plugins {
id 'java-library'
id 'jadx-library'
}

View File

@ -1,5 +1,5 @@
plugins {
id 'java-library'
id 'jadx-library'
}
dependencies {

View File

@ -1,5 +1,5 @@
plugins {
id 'java-library'
id 'jadx-library'
}
dependencies {