Skip to content

Instantly share code, notes, and snippets.

@166MMX
Created May 21, 2017 23:54
Show Gist options
  • Save 166MMX/9cee0ec5cbadf38b94e561dbd962687b to your computer and use it in GitHub Desktop.
Save 166MMX/9cee0ec5cbadf38b94e561dbd962687b to your computer and use it in GitHub Desktop.
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.edu.sc.seis:macAppBundle:2.1.5"
}
}
apply plugin: 'java'
apply plugin: 'edu.sc.seis.macAppBundle'
repositories {
jcenter()
maven {
name 'maven-eclipse-repo'
url 'https://maven-eclipse.github.io/maven'
}
}
wrapper {
version = '3.5'
distributionType = Wrapper.DistributionType.ALL
}
archivesBaseName = 'dbgl'
group = 'org.dbgl'
version = '0.81'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencies {
compile files('lib/loopy-vfs-0.3.jar')
compile files('lib/J7Zip.jar')
compile files('lib/swt-4.6.3-cocoa-macosx-x86_64.jar')
compile files('lib/swing2swt.jar')
compile files('lib/gallery-0.6.0.jar')
compile 'de.waldheinz:fat32-lib:0.6.5'
compile 'org.hsqldb:hsqldb:1.8.0.10'
compile 'org.jvnet:tiger-types:1.4'
compile 'org.glassfish.jersey.media:jersey-media-jaxb:2.25.1'
compile 'org.glassfish.jersey.core:jersey-client:2.25.1'
// https://mvnrepository.com/artifact/commons-io/commons-io
compile group: 'commons-io', name: 'commons-io', version: '2.5'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
// compile 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86:4.6.1'
// compile 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86_64:4.6.1'
// compile 'org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:4.6.1'
// compile 'org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:4.6.1'
// compile 'org.eclipse.swt:org.eclipse.swt.cocoa.macosx.x86_64:4.6.1'
// https://mvnrepository.com/artifact/junit/junit
compile group: 'junit', name: 'junit', version: '4.12'
}
jar {
manifest {
attributes([
'Specification-Title' : "DBGL",
'Specification-Version' : "${version}",
'Specification-Vendor' : "${System.properties.'user.name'}",
'Implementation-Title' : "common",
'Implementation-Version': "${version} ${new Date()}",
'Implementation-Vendor' : "${System.properties.'user.name'}",
])
}
}
macAppBundle {
icon = 'src/dist/macshared/DBGL.app/Contents/Resources/dbgl.icns'
appName = 'DOSBox Game Launcher'
bundleIdentifier = 'org.dbgl'
mainClassName = 'org.dbgl.gui.Launcher'
javaExtras = [
'-XstartOnFirstThread' : null,
// '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005': null,
]
javaProperties = [
'user.dir' : '$APP_ROOT/Contents/Resources',
]
bundleExtras = [
'NSHumanReadableCopyright' : 'GNU General Public License, version 2.0',
'CFBundleDisplayName' : 'DOSBox Game Launcher',
'LSApplicationCategoryType': 'public.app-category.games',
]
}
createApp {
def appDir = "${-> project.buildDir}/${-> project.macAppBundle.appOutputDir}/${-> project.macAppBundle.appName}.app"
doLast {
copy {
from 'src/dist/shared'
into "$appDir/Contents/Resources"
exclude '*.jar'
}
file("$appDir/Contents/Resources/captures").mkdirs()
file("$appDir/Contents/Resources/db").mkdirs()
file("$appDir/Contents/Resources/dosroot").mkdirs()
file("$appDir/Contents/Resources/export").mkdirs()
file("$appDir/Contents/Resources/profiles").mkdirs()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment