mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-21 01:30:34 +00:00
Building for 'ac' as well as Linux/Windows/Mac OS X.
This commit is contained in:
parent
3ed8f0b974
commit
3291b515d5
6
.gitignore
vendored
6
.gitignore
vendored
@ -12,12 +12,12 @@ TODO.local
|
||||
work
|
||||
TestImage.*
|
||||
**/Thumbs.db
|
||||
build/ACBuild.properties
|
||||
build/AppleCommander.preferences
|
||||
*.o
|
||||
*.lst
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
.gradle
|
||||
/build/
|
||||
build/
|
||||
target/
|
||||
.DS_Store
|
109
build.gradle
109
build.gradle
@ -1,34 +1,107 @@
|
||||
|
||||
// Apply the java plugin to add support for Java
|
||||
apply plugin: 'java'
|
||||
|
||||
// Apply the application plugin to add support for building an application
|
||||
apply plugin: 'application'
|
||||
|
||||
// Define the main class for the application
|
||||
mainClassName = 'com.webcodepro.applecommander.ui.AppleCommander'
|
||||
|
||||
// In this section you declare where to find the dependencies of your project
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
// SWT libraries
|
||||
url "http://maven-eclipse.github.io/maven"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'application'
|
||||
|
||||
ext {
|
||||
sourceCompatibility = '1.8'
|
||||
targetCompatibility = '1.8'
|
||||
|
||||
swtVersion = "4.6.1"
|
||||
junitVersion = "4.12"
|
||||
antVersion = "1.8.2"
|
||||
}
|
||||
|
||||
mainClassName = 'com.webcodepro.applecommander.ui.AppleCommander'
|
||||
version '1.3.6-BETA'
|
||||
|
||||
// Disable default JAR creation
|
||||
jar {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
// disable the crazy super-strict doclint tool in Java 8
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
tasks.withType(Jar) {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'com.webcodepro.applecommander.ui.AppleCommander'
|
||||
}
|
||||
from('LICENSE', 'CONTRIB', 'TODO', 'VERSIONS')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.eclipse.swt:org.eclipse.swt.cocoa.macosx.x86_64:$swtVersion"
|
||||
|
||||
compileOnly "org.apache.ant:ant:$antVersion"
|
||||
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
}
|
||||
|
||||
jar {
|
||||
task acJar(type: Jar) {
|
||||
dependencies {
|
||||
// Just to pass the compile step; these classes are stripped out below.
|
||||
compile "org.eclipse.swt:org.eclipse.swt.cocoa.macosx.x86_64:$swtVersion"
|
||||
}
|
||||
appendix 'ac'
|
||||
manifest {
|
||||
attributes 'Main-Class': "$mainClassName"
|
||||
}
|
||||
doFirst {
|
||||
from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||
attributes 'Main-Class' : 'com.webcodepro.applecommander.ui.ac'
|
||||
}
|
||||
from(sourceSets.main.output) {
|
||||
include 'com/webcodepro/**'
|
||||
exclude 'com/webcodepro/applecommander/ui/images/**'
|
||||
exclude 'com/webcodepro/applecommander/ui/swing/**'
|
||||
exclude 'com/webcodepro/applecommander/ui/swt/**'
|
||||
}
|
||||
}
|
||||
task linuxJar(type: Jar) {
|
||||
dependencies {
|
||||
compile "org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:$swtVersion"
|
||||
}
|
||||
appendix 'linux64-gtk'
|
||||
from(sourceSets.main.output) {
|
||||
include 'com/webcodepro/**'
|
||||
}
|
||||
doFirst {
|
||||
// Pick and include just the Linux JAR contents
|
||||
from { configurations.runtime.collect { it.name.contains('.linux.') ? zipTree(it) : 'fake' } }
|
||||
}
|
||||
}
|
||||
task macosxJar(type: Jar) {
|
||||
dependencies {
|
||||
compile "org.eclipse.swt:org.eclipse.swt.cocoa.macosx.x86_64:$swtVersion"
|
||||
}
|
||||
appendix 'macosx'
|
||||
from(sourceSets.main.output) {
|
||||
include 'com/webcodepro/**'
|
||||
}
|
||||
doFirst {
|
||||
// Pick and include just the Mac OS X JAR contents
|
||||
from { configurations.runtime.collect { it.name.contains('.macosx.') ? zipTree(it) : 'fake' } }
|
||||
}
|
||||
}
|
||||
task windowsJar(type: Jar) {
|
||||
dependencies {
|
||||
compile "org.eclipse.swt:org.eclipse.swt.win32.win32.x86_64:$swtVersion"
|
||||
}
|
||||
appendix 'win64'
|
||||
from(sourceSets.main.output) {
|
||||
include 'com/webcodepro/**'
|
||||
}
|
||||
doFirst {
|
||||
// Pick and include just the Windows SWT JAR contents
|
||||
from { configurations.runtime.collect { it.name.contains('.win32.') ? zipTree(it) : 'fake' } }
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives acJar
|
||||
archives linuxJar
|
||||
archives macosxJar
|
||||
archives windowsJar
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
|
||||
swtVersion = 4.6.1
|
||||
junitVersion = 4.12
|
||||
antVersion = 1.8.2
|
||||
|
Loading…
Reference in New Issue
Block a user