-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive clean up and overhaul of the build system to push project to …
…2.8.0
- Loading branch information
Showing
527 changed files
with
7,764 additions
and
8,111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
|
||
# 4 space indentation | ||
[*.{gradle, java, xml}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# Tab indentation (no size specified) | ||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
/.idea | ||
/target | ||
/src/test | ||
/build | ||
|
||
# Build Files | ||
dependency-reduced-pom.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,36 @@ buildscript { | |
} | ||
|
||
dependencies { | ||
classpath fileTree(dir: 'libs', include: '*.jar') | ||
classpath 'com.yuvimasory:orange-extensions:1.3.0' // OSX support | ||
classpath 'com.netflix.nebula:gradle-ospackage-plugin:8.1.0' // https://plugins.gradle.org/plugin/nebula.ospackage | ||
classpath 'edu.sc.seis.gradle:launch4j:2.4.6' // https://plugins.gradle.org/plugin/edu.sc.seis.launch4j | ||
classpath 'com.yuvimasory:orange-extensions:1.3.0' // OSX support | ||
} | ||
} | ||
|
||
plugins { | ||
id "nebula.ospackage" version "8.5.6" | ||
id "edu.sc.seis.launch4j" version "2.4.9" | ||
} | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'distribution' | ||
apply plugin: 'edu.sc.seis.launch4j' | ||
apply plugin: 'nebula.ospackage' | ||
|
||
// Common Configuration // | ||
rootProject.version='2.8.0' | ||
targetCompatibility='1.8' | ||
project.version = '2.8.0' | ||
|
||
project.ext.author = 'Dan Adler' | ||
project.ext.email = '<[email protected]>' | ||
project.ext.copyright = '(C) 2021' | ||
project.ext.description = 'Logisim Circuit Simulator' | ||
project.ext.url = 'https://github.com/dadler64/Logisim' | ||
project.ext.bundleId = 'com.cburch.logisim' | ||
project.ext.mainClass = "${project.ext.bundleId}.Main" | ||
project.ext.resPath = '/src/main/resources' | ||
|
||
allprojects { | ||
apply plugin: 'eclipse' | ||
apply plugin: 'idea' | ||
|
||
tasks.withType(JavaCompile) { | ||
sourceCompatibility = targetCompatibility = '1.8' | ||
sourceCompatibility = targetCompatibility = '1.10' | ||
options.compilerArgs << '-Xlint:deprecation' | ||
options.compilerArgs << '-Xlint:unchecked' | ||
options.encoding = 'UTF-8' | ||
|
@@ -48,110 +56,106 @@ cleanIdea.doFirst { | |
followSymLinks = true | ||
} | ||
|
||
subprojects.each { subproject -> | ||
evaluationDependsOn(subproject.path) | ||
} | ||
|
||
// All in one JAR file // | ||
jar { | ||
def deps = [] | ||
|
||
subprojects.each { subproject -> | ||
from subproject.sourceSets.main.output.classesDirs | ||
from subproject.sourceSets.main.output.resourcesDir | ||
deps += subproject.configurations.runtime - subproject.configurations.provided | ||
} | ||
subprojects.each { subproject -> | ||
deps -= subproject.jar.archivePath | ||
} | ||
deps = deps.unique().collect {it.isDirectory() ? it : zipTree(it)} | ||
from deps | ||
|
||
manifest { | ||
attributes 'Main-Class': 'com.cburch.logisim.Main', | ||
'SplashScreen-Image': 'src/main/resources/logisim/img/logisim-icon-128.png', | ||
'Logisim-Version': project.version | ||
attributes 'Main-Class': project.ext.mainClass, 'JD-FX-Version': project.version | ||
} | ||
|
||
duplicatesStrategy DuplicatesStrategy.EXCLUDE | ||
|
||
// This line of code recursively collects and copies all of a project's files | ||
// and adds them to the JAR itself. One can extend this task, to skip certain | ||
// files or particular types at will | ||
from { | ||
configurations.compileClasspath.collect { | ||
it.isDirectory() ? it : zipTree(it) | ||
} | ||
} | ||
} | ||
|
||
// Java executable wrapper for Windows // | ||
launch4j { | ||
createExe.dependsOn 'jar' | ||
|
||
version = textVersion = project.version | ||
fileDescription = productName = 'Logisim' | ||
errTitle 'Logisim Windows Wrapper' | ||
copyright 'Dan Adler (C) 2019,2020' | ||
fileDescription = 'Continuation on the Logisim circuit simulator' | ||
icon projectDir.path + '/src/main/resources/logisim/img/logisim-icon.ico' | ||
fileDescription = productName = rootProject.name | ||
errTitle = "${rootProject.name} Wrapper" | ||
copyright = "${project.ext.author} ${project.ext.copyright}" | ||
fileDescription = project.ext.description | ||
icon = "${projectDir.path}/dist/windows/${project.name}.ico" | ||
bundledJrePath = '%JAVA_HOME%' | ||
} | ||
|
||
// Packages for Linux // | ||
//ospackage { | ||
// buildDeb.dependsOn 'proguard' | ||
// buildRpm.dependsOn 'proguard' | ||
// buildDeb.dependsOn 'jar' | ||
// buildRpm.dependsOn 'jar' | ||
// | ||
// license = file('LICENSE') | ||
// maintainer 'Dan Adler <[email protected]>' | ||
// os LINUX | ||
// packageDescription 'Continuation on the Logisim circuit simulator' | ||
// packageGroup 'java' | ||
// packageName 'logisim' | ||
// release '0' | ||
// summary 'Software Simulator' | ||
// url 'https://github.com/dadler64/logisim' | ||
// | ||
// logger.debug('/opt/' + project.name) | ||
// into '/opt/' + project.name | ||
// from (jar) { | ||
// fileMode 0755 | ||
// } | ||
// from ('dist/linux/resources/') { | ||
// fileMode 0755 | ||
// } | ||
// from 'LICENSE', 'README.md' | ||
// | ||
// postInstall 'cd /opt/' + project.name + '; ln -s ./' + file(jar).name + ' ./pennsim.jar; ' + | ||
// 'xdg-icon-resource install --size 128 --novendor ./PenSimIcon.png pennsim; xdg-desktop-menu install ./*.desktop' | ||
// preUninstall 'cd /opt/' + project.name + '; rm -f ./jd-gui.jar; rm -fr ./ext; xdg-desktop-menu uninstall ./*.desktop' | ||
//} | ||
|
||
// Distributions for MacOS and Windows // | ||
distributions { | ||
|
||
osx.contents { | ||
into('Logisim.app/Contents') { | ||
into('Logisim.app/Contents/Resources') { | ||
from('dist/macos/resources') { | ||
include 'logisim.icns' | ||
// info.plist file | ||
into("${rootProject.name}.app/Contents") { | ||
if (file("./dist/macos/Info.plist").exists()) { | ||
from('./dist/macos') { | ||
include 'Info.plist' | ||
expand VERSION: project.version, | ||
JAR: project.name, | ||
COPYRIGHT: project.ext.copyright, | ||
AUTHOR: project.ext.author, | ||
BUNDLE_ID: project.ext.bundleId, | ||
MAIN_CLASS: project.ext.mainClass | ||
} | ||
} else { | ||
println("WARNING: Unable to locate the \'Info.plist\' file!\nMacOS bundled app may not work!") | ||
} | ||
} | ||
// universalJavaApplicationStub.sh | ||
into("${rootProject.name}.app/Contents/MacOS") { | ||
if (file("./dist/macos/universalJavaApplicationStub.sh").exists()) { | ||
from('./dist/macos') { | ||
include 'universalJavaApplicationStub.sh' | ||
fileMode 0755 | ||
} | ||
} else { | ||
println("WARNING: Unable to locate the \'universalJavaApplicationStub.sh\' file!\nMacOS bundled app may not work!") | ||
} | ||
from('dist/macos/resources') { | ||
include 'Info.plist' | ||
expand VERSION: project.version, | ||
// JAR: file(proguard.outJarFiles[0]).name | ||
JAR: jar.baseName | ||
} | ||
// App *.icns file | ||
into("${rootProject.name}.app/Contents/Resources") { | ||
String iconFileName = "${rootProject.name}App" | ||
if (file("./dist/macos/${iconFileName}.icns").exists()) { | ||
from('./dist/macos') { | ||
// Make sure this matches the name of the .icns file in the 'dist/macos/resources/' folder | ||
include "${iconFileName}.icns" | ||
} | ||
} else { | ||
println("WARNING: Unable to locate icon for MacOS app at: <./dist/macos/resources/${rootProject.name}.icns>!") | ||
} | ||
} | ||
into('Logisim.app/Contents/MacOS') { | ||
from('dist/macos/resources') { | ||
include 'universalJavaApplicationStub.sh' | ||
fileMode 0755 | ||
// Document *.icns file | ||
into("${rootProject.name}.app/Contents/Resources") { | ||
String iconFileName = "${rootProject.name}Doc" | ||
if (file("./dist/macos/${iconFileName}.icns").exists()) { | ||
from('./dist/macos') { | ||
// Make sure this matches the name of the .icns file in the 'dist/macos/resources/' folder | ||
include "${iconFileName}.icns" | ||
} | ||
} else { | ||
println("WARNING: Unable to locate icon for MacOS app at: <./dist/macos/resources/${rootProject.name}.icns>!") | ||
} | ||
} | ||
into('Logisim.app/Contents/Resources/Java') { | ||
// project *.jar file | ||
into("${rootProject.name}.app/Contents/Resources/Java") { | ||
from jar | ||
} | ||
from 'LICENSE', 'README.md' | ||
} | ||
|
||
windows.contents { | ||
from 'build/launch4j/Logisim.exe' | ||
from "build/launch4j/${project.name}.exe" | ||
from 'LICENSE', 'README.md' | ||
} | ||
|
||
crossplatform.contents { | ||
from "build/libs/${project.name}-${project.version}.jar" | ||
from 'LICENSE', 'README.md' | ||
} | ||
|
||
|
@@ -162,25 +166,13 @@ distributions { | |
installOsxDist.dependsOn 'jar' | ||
osxDistTar.dependsOn 'jar' | ||
osxDistZip.dependsOn 'jar' | ||
} | ||
|
||
//build.finalizedBy buildDeb | ||
//build.finalizedBy buildRpm | ||
|
||
|
||
//==================== | ||
// Local Dependencies | ||
//==================== | ||
repositories { | ||
flatDir { | ||
dirs 'libs' | ||
} | ||
// Use this cross platform build until linux building resumes | ||
installCrossplatformDist.dependsOn 'jar' | ||
crossplatformDistTar.dependsOn 'jar' | ||
crossplatformDistZip.dependsOn 'jar' | ||
} | ||
|
||
dependencies { | ||
compile name: 'ColorPicker' | ||
compile name: 'FontChooser' | ||
compile name: 'JavaHelp' | ||
compile name: 'Logger-1.0.0' | ||
compile name: 'MRJAdapter' | ||
} | ||
implementation fileTree(dir: 'libs', include: ('*.jar')) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Desktop Entry] | ||
Comment=COMMENT | ||
Terminal=TERMINAL | ||
Name=NAME | ||
Exec=java -jar /opt/logisim/JAR_FILE | ||
Type=Application | ||
Icon=NAME.png | ||
MimeType=application/java;application/java-vm;application/java-archive | ||
StartupWMClass=MAIN_CLASS |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.