1 Star 0 Fork 1

香蕉你个巴拉/proguard

forked from 牧云12/proguard 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 7.09 KB
一键复制 编辑 原始数据 按行查看 历史
plugins {
id 'com.jfrog.bintray'
id 'distribution'
id 'signing'
}
allprojects {
group = 'com.guardsquare'
version = proguardVersion
}
task buildDocumentation(type: Exec) {
inputs.dir 'docs/md'
inputs.file 'docs/mkdocs.yml'
outputs.dir 'docs/html'
executable 'sh'
args '-c', "docker run --volume $rootDir/docs:/docs --rm squidfunk/mkdocs-material:5.2.2 build"
}
// Add repositories
allprojects { Project project ->
afterEvaluate {
if (pluginManager.hasPlugin('maven-publish')) {
configure(project) {
publishing {
repositories {
maven {
name = 'Github'
url = uri('https://maven.pkg.github.com/guardsquare/proguard')
credentials {
username = project.findProperty('PROGUARD_GITHUB_USERNAME')
password = project.findProperty('PROGUARD_GITHUB_TOKEN')
}
}
maven {
name = 'Sonatype'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
credentials(PasswordCredentials) {
username = findProperty('PROGUARD_STAGING_USERNAME')
password = findProperty('PROGUARD_STAGING_PASSWORD')
}
}
}
}
if (hasProperty('PROGUARD_SIGNING_KEY')) {
// We use in-memory ascii-armored keys
// See https://docs.gradle.org/current/userguide/signing_plugin.html#sec:in-memory-keys
signing {
String key = findProperty('PROGUARD_SIGNING_KEY')
String password = findProperty('PROGUARD_SIGNING_PASSWORD')
useInMemoryPgpKeys(key, password)
sign publishing.publications.getByName(project.name)
}
}
}
}
}
}
// Add publication
allprojects { Project project ->
afterEvaluate {
if (pluginManager.hasPlugin('maven-publish')) {
configure(project) {
publishing {
publications {
create(project.name, MavenPublication) {
pom {
artifactId = "proguard-$project.name"
name = "$group:$artifactId"
url = 'https://www.guardsquare.com/proguard'
licenses {
license {
name = 'GNU General Public License, Version 2'
url = 'https://www.gnu.org/licenses/gpl-2.0.txt'
distribution = 'repo'
}
}
issueManagement {
system = 'Github Tracker'
url = 'https://github.com/Guardsquare/proguard/issues'
}
scm {
url = 'https://github.com/Guardsquare/proguard.git'
connection = 'scm:git:https://github.com/Guardsquare/proguard.git'
}
developers {
developer {
id = 'lafortune'
name = 'Eric Lafortune'
organization = 'Guardsquare'
organizationUrl = 'https://www.guardsquare.com/'
roles = ['Project Administrator', 'Developer']
}
}
}
}
}
}
}
}
}
}
// Configure default publication (all Java projects)
allprojects { Project project ->
afterEvaluate {
if (pluginManager.hasPlugin('maven-publish') && pluginManager.hasPlugin('java')) {
configure(project) {
javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
getByName(project.name) {
from components.java
}
}
}
}
}
}
}
// Configure bintray
allprojects { Project project ->
afterEvaluate {
if (pluginManager.hasPlugin('maven-publish') && pluginManager.hasPlugin('com.jfrog.bintray')) {
configure(project) {
bintray {
Publication pub = publishing.publications.getByName(project.name)
user = findProperty('PROGUARD_BINTRAY_USER')
key = findProperty('PROGUARD_BINTRAY_KEY')
publications = [project.name]
dryRun = false
override = true
pkg {
repo = 'proguard'
name = "$project.group:$pub.artifactId"
desc = pub.artifactId
licenses = ['GPL-2.0']
websiteUrl = pub.pom.url.get()
issueTrackerUrl = pub.pom.issueManagement.url.get()
vcsUrl = pub.pom.scm.url.get()
version {
name = project.version
gpg.sign = true
released = new Date()
}
}
}
}
}
}
}
distributions {
main {
distributionBaseName.set('proguard')
contents {
into('lib') {
from tasks.getByPath(':base:fatJar').outputs
from tasks.getByPath(':gui:fatJar').outputs
from tasks.getByPath(':retrace:fatJar').outputs
from tasks.getByPath(':ant:fatJar').outputs
}
into('docs') {
from('docs/md') {
includeEmptyDirs = false
include '**/*.md'
}
}
from(rootDir) {
include 'bin/'
include 'examples/'
include 'LICENSE'
include 'LICENSE_exception.md'
}
}
}
}
distTar {
compression = Compression.GZIP
archiveExtension.set('tar.gz')
}
clean {
delete file("$rootDir/lib")
// TODO docker runs as root, so cannot clean the HTML yet
// delete buildDocumentation.outputs
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/oodcloud/proguard.git
git@gitee.com:oodcloud/proguard.git
oodcloud
proguard
proguard
master

搜索帮助