multidexlib2/configure-artifacts.gradle
2019-11-19 08:26:43 -03:00

43 lines
1.1 KiB
Groovy

/*
* multidexlib2 - Copyright 2015-2019 Rodrigo Balerdi
* (GNU General Public License version 3 or later)
*
* multidexlib2 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.
*/
java {
withJavadocJar()
withSourcesJar()
}
ext.generatedResourcesDir = layout.buildDirectory.get().dir('generated-resources')
task generateResources(type: Sync) {
from(rootDir) {
include 'README.txt'
include 'NOTICE.txt'
include 'LICENSE.txt'
}
into generatedResourcesDir
}
sourceSets.main.output.dir builtBy: generateResources, generatedResourcesDir
def sharedManifest = manifest {
attributes(
'Implementation-Title': artifactName,
'Implementation-Version': version
)
}
tasks.withType(Jar).configureEach {
archiveBaseName.set mainArtifact
manifest.from sharedManifest
reproducibleFileOrder = true
preserveFileTimestamps = false
duplicatesStrategy = DuplicatesStrategy.FAIL
}