Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
fvarrui committed Feb 11, 2022
2 parents 78ac598 + 39c044f commit 1420f52
Show file tree
Hide file tree
Showing 49 changed files with 814 additions and 391 deletions.
232 changes: 118 additions & 114 deletions README.md

Large diffs are not rendered by default.

82 changes: 40 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies {
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'
Expand All @@ -70,7 +70,7 @@ dependencies {
}

group = 'io.github.fvarrui'
version = '1.6.2'
version = '1.6.3'
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
Expand Down Expand Up @@ -150,6 +150,9 @@ publishToMavenLocal.dependsOn(build)

if (project.hasProperty('release')) {

apply plugin: 'signing'
apply plugin: 'maven'

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
Expand All @@ -164,51 +167,46 @@ if (project.hasProperty('release')) {
archives javadocJar, sourcesJar
}

allprojects {
apply plugin: 'signing'
apply plugin: 'maven'

// Signature of artifacts
signing {
sign configurations.archives
}
// 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'
// 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:[email protected]:fvarrui/fvarrui.git'
url 'https://github.com/fvarrui/JavaPackager'
}

scm {
connection 'scm:git:git://github.com/fvarrui/JavaPackager.git'
developerConnection 'scm:git:[email protected]: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'
}
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'
}
developers {
developer {
id = 'fvarrui'
name = 'Francisco Vargas Ruiz'
url = 'https://github.com/fvarrui'
}
}
}
Expand Down
93 changes: 57 additions & 36 deletions docs/macosx-specific-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,60 @@
```xml
<macConfig>

<!-- general properties -->
<appId>app unique identifier</appId>
<icnsFile>path/to/icon.icns</icnsFile>
<generateDmg>true|false</generateDmg>
<generatePkg>true|false</generatePkg>
<relocateJar>true|false</relocateJar>

<!-- signing properties -->
<developerId>singning identity</developerId>
<entitlements>path/to/entitlements.plist</entitlements>
<codesignApp>true|false</codesignApp>

<!-- properties used in DMG disk image generation -->
<backgroundImage>path/to/png</backgroundImage>
<windowX>x</windowX>
<windowY>y</windowY>
<windowWidth>width</windowWidth>
<windowHeight>height</windowHeight>
<iconSize>size</iconSize>
<textSize>size</textSize>
<iconX>x</iconX>
<iconY>y</iconY>
<appsLinkIconX>x</appsLinkIconX>
<appsLinkIconY>y</appsLinkIconY>
<volumeIcon>path/to/icns</volumeIcon>
<volumeName>${name}</volumeName>

<!-- general properties -->
<appId>app unique identifier</appId>
<icnsFile>path/to/icon.icns</icnsFile>
<generateDmg>true|false</generateDmg>
<generatePkg>true|false</generatePkg>
<relocateJar>true|false</relocateJar>

<!-- signing properties -->
<developerId>singning identity</developerId>
<entitlements>path/to/entitlements.plist</entitlements>
<codesignApp>true|false</codesignApp>

<!-- properties used for DMG disk image generation -->
<backgroundImage>path/to/png</backgroundImage>
<windowX>x</windowX>
<windowY>y</windowY>
<windowWidth>width</windowWidth>
<windowHeight>height</windowHeight>
<iconSize>size</iconSize>
<textSize>size</textSize>
<iconX>x</iconX>
<iconY>y</iconY>
<appsLinkIconX>x</appsLinkIconX>
<appsLinkIconY>y</appsLinkIconY>
<volumeIcon>path/to/icns</volumeIcon>
<volumeName>${name}</volumeName>

<!-- properties used for Info.plist file generation -->
<infoPlist>
<bundlePackageType>BNDL|APPL|FMWK</bundlePackageType>
<additionalEntries>
<![CDATA[
<key>ThisIsABoolean</key>
<true/>
<key>ThisIsAString</key>
<string>value</string>
[...]
]]>
</addtionalEntries>
</infoPlist>

</macConfig>
```

| Property | Mandatory | Default value | Description |
| -------------- | --------- | -------------- | ------------------------------------------------------------ |
| `icnsFile` | :x: | `null` | Icon file. |
| `generateDmg` | :x: | `true` | Enables DMG disk image file generation. |
| `generatePkg` | :x: | `true` | Enables installation package generation. |
| Property | Mandatory | Default value | Description |
| -------------- | --------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `icnsFile` | :x: | `null` | Icon file. |
| `generateDmg` | :x: | `true` | Enables DMG disk image file generation. |
| `generatePkg` | :x: | `true` | Enables installation package generation. |
| `relocateJar` | :x: | `true` | If `true`, Jar files are located in `Contents/Resources/Java` folder, otherwise they are located in `Contents/Resources` folder. |
| `appId` | :x: | `${mainClass}` | App unique identifier. |
| `developerId` | :x: | `null` | Signing identity. |
| `entitlements` | :x: | `null` | Path to [entitlements](https://developer.apple.com/documentation/bundleresources/entitlements) file. |
| `codesignApp` | :x: | `true` | If it is set to `false`, generated app will not be codesigned. |
| `appId` | :x: | `${mainClass}` | App unique identifier. |
| `developerId` | :x: | `null` | Signing identity. |
| `entitlements` | :x: | `null` | Path to [entitlements](https://developer.apple.com/documentation/bundleresources/entitlements) file. |
| `codesignApp` | :x: | `true` | If it is set to `false`, generated app will not be codesigned. |

## DMG generation properties

Expand All @@ -63,3 +77,10 @@
| `volumeName` | :x: | `${displayName}` | Volume name *(:warning: whitespaces are removed)*. |

![DMG properties explained](dmg-properties-explained.png)

## Info.plist generation properties

| Property | Mandatory | Default value | Description |
| ------------------- | --------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bundlePackageType` | :x: | BNDL | [Bundle package type](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundlepackagetype): BNDL, APPL, FMWK. |
| `additionalEntries` | :x: | `""` | String with `Info.plist`additional entries. |
Loading

0 comments on commit 1420f52

Please sign in to comment.