mirror of
https://github.com/revanced/multidexlib2.git
synced 2025-04-29 22:24:28 +02:00
113 lines
2.9 KiB
Groovy
113 lines
2.9 KiB
Groovy
/*
|
|
* DexPatcher - Copyright 2015-2019 Rodrigo Balerdi
|
|
* (GNU General Public License version 3 or later)
|
|
*
|
|
* DexPatcher is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published
|
|
* by the Free Software Foundation, either version 3 of the License,
|
|
* or (at your option) any later version.
|
|
*/
|
|
|
|
plugins {
|
|
id 'java'
|
|
id 'signing'
|
|
id 'maven'
|
|
}
|
|
|
|
def dexlib2Version = '2.3.4'
|
|
def multidexlib2VersionSuffix = ''
|
|
|
|
group = 'com.github.lanchon.dexpatcher'
|
|
version = dexlib2Version + multidexlib2VersionSuffix
|
|
|
|
sourceCompatibility = '1.7'
|
|
def jdk = findProperty('JDK7_HOME') ?: '/usr/lib/jvm/java-7-openjdk-amd64'
|
|
def jdk_rt = new File(jdk, 'jre/lib/rt.jar')
|
|
if (jdk_rt.exists()) compileJava.options.bootClasspath = jdk_rt
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compile 'org.smali:dexlib2:' + dexlib2Version
|
|
}
|
|
|
|
def sharedManifest = manifest {
|
|
attributes(
|
|
'Implementation-Title': 'multidexlib2',
|
|
'Implementation-Version': version
|
|
)
|
|
}
|
|
|
|
jar {
|
|
manifest.from sharedManifest
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
manifest.from sharedManifest
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = 'javadoc'
|
|
from javadoc
|
|
manifest.from sharedManifest
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
if (project.hasProperty('ossrhUsername')) {
|
|
|
|
signing {
|
|
sign configurations.archives
|
|
}
|
|
|
|
uploadArchives {
|
|
repositories.mavenDeployer {
|
|
pom.project {
|
|
name 'multidexlib2'
|
|
description 'Multi-dex extensions for dexlib2.'
|
|
url 'https://github.com/DexPatcher/multidexlib2'
|
|
|
|
scm {
|
|
connection 'scm:git:git://github.com/DexPatcher/multidexlib2.git'
|
|
developerConnection 'scm:git:ssh://github.com:DexPatcher/multidexlib2.git'
|
|
url 'https://github.com/DexPatcher/multidexlib2/tree/master'
|
|
}
|
|
|
|
licenses {
|
|
license {
|
|
name 'GNU General Public License (version 3 or later)'
|
|
url 'https://www.gnu.org/licenses/gpl.txt'
|
|
}
|
|
}
|
|
|
|
developers {
|
|
developer {
|
|
name 'Lanchon'
|
|
url 'https://github.com/Lanchon'
|
|
}
|
|
}
|
|
}
|
|
|
|
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
authentication userName: ossrhUsername, password: ossrhPassword
|
|
}
|
|
|
|
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
|
authentication userName: ossrhUsername, password: ossrhPassword
|
|
}
|
|
|
|
beforeDeployment {
|
|
signing.signPom(it)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|