代码拉取完成,页面将自动刷新
同步操作将从 深情小建/JavaPackager 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
plugins {
id 'java'
id 'maven'
id 'maven-publish'
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.12.0'
id 'io.codearte.nexus-staging' version '0.21.2'
id 'eclipse'
id 'de.undercouch.download' version '4.1.1'
}
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
gradlePlugin {
plugins {
javaPackagerPlugin {
id = 'io.github.fvarrui.javapackager.plugin'
implementationClass = 'io.github.fvarrui.javapackager.gradle.PackagePlugin'
}
}
}
pluginBundle {
website = 'http://github.com/fvarrui/JavaPackager'
vcsUrl = 'http://github.com/fvarrui/JavaPackager.git'
description = 'Packages Java applications as native Windows, Mac OS X or GNU/Linux executables and creates installers for them'
tags = ['java', 'packager', 'gradle-plugin', 'maven-plugin', 'native', 'installer', 'debian-packages', 'rpm-packages', 'dmg', 'maven', 'gradle', 'distribution', 'javapackager', 'linux-executables', 'deb', 'rpm', 'native-windows', 'java-applications', 'pkg', 'msi']
plugins {
javaPackagerPlugin {
displayName = 'JavaPackager'
}
}
}
configurations {
mavenEmbedder
}
dependencies {
implementation 'org.apache.maven:maven-plugin-api:3.6.0'
implementation 'org.codehaus.plexus:plexus-utils:3.1.1'
implementation 'org.twdata.maven:mojo-executor:2.3.0'
implementation 'commons-io:commons-io:2.6'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'org.apache.commons:commons-collections4:4.1'
implementation 'org.apache.commons:commons-compress:1.21'
implementation 'org.apache.velocity:velocity-engine-core:2.0'
implementation 'io.github.fvarrui:gradle-launch4j:2.4.7'
implementation 'org.vafer:jdeb:1.9'
implementation 'net.jsign:jsign-core:3.1'
implementation 'org.redline-rpm:redline:1.2.10'
testImplementation 'junit:junit:4.12'
compileOnly 'org.apache.maven.plugin-tools:maven-plugin-annotations:3.6.0'
mavenEmbedder 'org.apache.maven:maven-embedder:3.6.0'
mavenEmbedder 'org.apache.maven:maven-compat:3.6.0'
mavenEmbedder 'org.slf4j:slf4j-simple:1.7.30'
mavenEmbedder 'org.eclipse.aether:aether-connector-basic:1.1.0'
mavenEmbedder 'org.eclipse.aether:aether-transport-wagon:1.1.0'
mavenEmbedder 'org.apache.maven.wagon:wagon-http:3.4.1'
mavenEmbedder 'org.apache.maven.wagon:wagon-provider-api:3.4.1'
}
group = 'io.github.fvarrui'
version = '1.6.0-SNAPSHOT'
description = 'Hybrid Maven/Gradle plugin to package Java applications as native Windows, Mac OS X or GNU/Linux executables and create installers for them'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
}
}
}
install.repositories.mavenInstaller.pom.with {
groupId = project.group
artifactId = project.name
version = project.version
description = project.description
packaging = 'maven-plugin'
}
// runs the plugin description generator
task generatePluginDescriptor(type: JavaExec, dependsOn: compileJava) {
def pomFile = file("$buildDir/pom.xml")
def pluginDescriptorFile = new File(project.compileJava.destinationDir, 'META-INF/maven/plugin.xml')
def directory = buildDir.canonicalPath
def outputDirectory = compileJava.destinationDir.canonicalPath
// FIXME: this does not seem to be working
inputs.files project.compileJava.outputs.files
outputs.file pluginDescriptorFile
classpath = configurations.mavenEmbedder
main = 'org.apache.maven.cli.MavenCli'
systemProperties['maven.multiModuleProjectDirectory'] = projectDir
args = [
'--errors',
'--batch-mode',
'--file', "${buildDir}/pom.xml",
'org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor',
'-Dproject.build.sourceEncoding=' + compileJava.options.encoding
]
doFirst {
install.repositories
.mavenInstaller
.pom
.withXml {
asNode().appendNode('repositories').appendNode('repository')
.with {
appendNode('id', 'gradle')
appendNode('name', 'Gradle Plugin Portal')
appendNode('url', 'https://plugins.gradle.org/m2/')
}
asNode().appendNode('build')
.with {
appendNode('directory', directory)
appendNode('outputDirectory', outputDirectory)
}
}
.writeTo(pomFile)
assert pomFile.file, "${pomFile.canonicalPath}: was not generated"
logger.info("POM is generated in ${pomFile.canonicalPath}")
}
doLast {
assert pluginDescriptorFile.file, "${pluginDescriptorFile.canonicalPath}: was not generated"
logger.info("Plugin descriptor is generated in ${pluginDescriptorFile.canonicalPath}")
}
}
project.jar.dependsOn(generatePluginDescriptor)
publishToMavenLocal.dependsOn(build)
if (project.hasProperty('release')) {
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
allprojects {
apply plugin: 'signing'
apply plugin: 'maven'
// Signature of artifacts
signing {
sign configurations.archives
}
// OSSRH publication
uploadArchives {
repositories {
mavenDeployer {
// POM signature
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
// Target repository
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUser, password: ossrhPassword)
}
pom.project {
name project.name
description project.description
packaging = 'maven-plugin'
url 'https://github.com/fvarrui/JavaPackager'
scm {
connection 'scm:git:git://github.com/fvarrui/JavaPackager.git'
developerConnection 'scm:git:git@github.com:fvarrui/fvarrui.git'
url 'https://github.com/fvarrui/JavaPackager'
}
licenses {
license {
name 'GPL-v3.0'
url 'http://www.gnu.org/licenses/gpl-3.0.txt'
distribution 'repo'
}
}
developers {
developer {
id = 'fvarrui'
name = 'Francisco Vargas Ruiz'
url = 'https://github.com/fvarrui'
}
}
}
}
}
}
}
}
nexusStaging {
username = project.findProperty('ossrhUser') ?: ''
password = project.findProperty('ossrhPassword') ?: ''
}
task updateUniversalJavaApplicationStub(type: Download) {
group 'Update'
description 'Downloads universalJavaApplicationStub to src/main/resources/mac and overrides the existing one.'
src 'https://raw.githubusercontent.com/fvarrui/universalJavaApplicationStub/master/src/universalJavaApplicationStub'
dest file('src/main/resources/mac')
overwrite true
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。