/* * 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-library' id 'maven-publish' id 'signing' } 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.bootstrapClasspath = files(jdk_rt) repositories { jcenter() } dependencies { api 'org.smali:dexlib2:' + dexlib2Version } java { withJavadocJar() withSourcesJar() } def sharedManifest = manifest { attributes( 'Implementation-Title': 'multidexlib2', 'Implementation-Version': version ) } tasks.withType(Jar).configureEach { manifest.from sharedManifest reproducibleFileOrder = true preserveFileTimestamps = false duplicatesStrategy = DuplicatesStrategy.FAIL } publishing { publications { multidexlib2(MavenPublication) { artifactId = 'multidexlib2' from components.java pom { 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' } } } } } } publishing { repositories { maven { if (project.hasProperty('publishing.url')) { url = project.getProperty('publishing.url') credentials { username = project.getProperty('publishing.username') password = project.getProperty('publishing.password') } } else { url = layout.buildDirectory.dir('repository') } } } } signing { if (project.hasProperty('signing.secretKeyRingFile')) { sign publishing.publications.multidexlib2 } } wrapper { distributionType = Wrapper.DistributionType.ALL }