Converted to Gradle project, and switched to FlatLAF.
1 parent 2e3ca6c commit b8490f6ef4adf343d376e3e50e869f5a8c31a8e1
Mark George authored on 28 Sep 2020
Showing 58 changed files
View
98
build.gradle
apply plugin: 'java'
plugins {
id 'application'
}
 
repositories {
mavenCentral()
jcenter()
// since the Jasper dickheads keep creating custom builds of other projects
// we need to add a repository for their "special" versions
maven {
}
}
 
 
dependencies {
// https://mvnrepository.com/artifact/com.h2database/h2
compile group: 'com.h2database', name: 'h2', version: '1.4.196'
// https://mvnrepository.com/artifact/net.sourceforge.dynamicreports/dynamicreports-core
compile group: 'net.sourceforge.dynamicreports', name: 'dynamicreports-core', version: '5.0.0'
 
// https://mvnrepository.com/artifact/org.simplejavamail/simple-java-mail
compile group: 'org.simplejavamail', name: 'simple-java-mail', version: '4.2.3'
}
 
 
 
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'res'
}
 
}
implementation group: 'com.h2database', name: 'h2', version: '1.4.200'
implementation group: 'net.sourceforge.dynamicreports', name: 'dynamicreports-core', version: '5.0.0'
implementation group: 'org.simplejavamail', name: 'simple-java-mail', version: '4.2.3'
implementation group: 'com.formdev', name: 'flatlaf', version: '0.38'
implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
}
 
task download(type: Copy) {
from sourceSets.main.runtimeClasspath
into 'libs/'
}
 
project.configurations.implementation.setCanBeResolved(true)
 
jar {
manifest {
attributes (
'Main-Class': 'Main'
'Main-Class': 'Main',
'Class-Path': configurations.implementation.collect { 'lib/' + it.name }.join(' ')
)
}
}
}
 
task createMissingSourceDirs {
group = "Source Directories"
description = "Create all of the missing source directories for this project."
doFirst {
sourceSets.each { def sourceRoot ->
sourceRoot.allSource.srcDirTrees.each { def sourceDir ->
if(!sourceDir.dir.exists()) {
println "Creating ${sourceDir}"
mkdir sourceDir.dir
}
}
}
}
}
 
task deleteEmptySourceDirs {
group = "Source Directories"
description = "Delete all empty source directories."
doFirst {
sourceSets.each { def sourceRoot ->
sourceRoot.allSource.srcDirTrees.each { def sourceDir ->
if(sourceDir.dir.exists() && sourceDir.dir.isDirectory() && sourceDir.dir.list().length == 0) {
println "Removing empty ${sourceDir}"
sourceDir.dir.delete()
}
}
}
}
 
}
 
compileJava {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
 
mainClassName = 'Main'
View
74
build.xml 100644 → 0
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="marking" default="default" basedir=".">
<description>Builds, tests, and runs the project marking.</description>
<import file="nbproject/build-impl.xml"/>
<!--
 
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
 
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
 
(Targets beginning with '-' are not intended to be called on their own.)
 
Example of inserting an obfuscator after compilation could look like this:
 
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
 
For list of available properties check the imported
nbproject/build-impl.xml file.
 
 
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
 
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
 
An example of overriding the target for project execution could look like this:
 
<target name="run" depends="marking-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
 
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
 
-->
</project>
View
manifest.mf 100644 → 0
View
nbproject/build-impl.xml 100644 → 0
View
nbproject/genfiles.properties 100644 → 0
View
nbproject/private/config.properties 100644 → 0
View
nbproject/private/private.properties 100644 → 0
View
nbproject/private/private.xml 100644 → 0
View
nbproject/project.properties 100644 → 0
View
nbproject/project.xml 100644 → 0
View
src/Main.java 100644 → 0
View
src/dao/JdbcConnection.java 100644 → 0
View
src/dao/MarkingProperties.java 100644 → 0
View
src/dao/ResultDAO.java 100644 → 0
View
src/dao/RowSetTableModel.java 100644 → 0
View
src/dao/ScheduleDAO.java 100644 → 0
View
src/main/java/Main.java 0 → 100644
View
src/main/java/dao/JdbcConnection.java 0 → 100644
View
src/main/java/dao/MarkingProperties.java 0 → 100644
View
src/main/java/dao/ResultDAO.java 0 → 100644
View
src/main/java/dao/RowSetTableModel.java 0 → 100644
View
src/main/java/dao/ScheduleDAO.java 0 → 100644
View
src/main/java/model/Criterion.java 0 → 100644
View
src/main/java/model/CriterionEditor.java 0 → 100644
View
src/main/java/model/Student.java 0 → 100644
View
src/main/java/model/Submission.java 0 → 100644
View
src/main/java/report/Batcher.java 0 → 100644
View
src/main/java/report/FeedbackReportGenerator.java 0 → 100644
View
src/main/java/report/SendReport.java 0 → 100644
View
src/main/java/schema.sql 0 → 100644
View
src/main/java/ui/CategoryPanel.java 0 → 100644
View
src/main/java/ui/CriterionPanel.java 0 → 100644
View
src/main/java/ui/MarkingFrame.java 0 → 100644
View
src/main/java/ui/PasswordDialog.form 0 → 100644
View
src/main/java/ui/PasswordDialog.java 0 → 100644
View
src/main/java/ui/RadioGroup.java 0 → 100644
View
src/main/java/ui/SubmissionFrame.form 0 → 100644
View
src/main/java/ui/SubmissionFrame.java 0 → 100644
View
src/main/resources/marking.properties 0 → 100644
View
src/marking.properties 100644 → 0
View
src/model/Criterion.java 100644 → 0
View
src/model/CriterionEditor.java 100644 → 0
View
src/model/Student.java 100644 → 0
View
src/model/Submission.java 100644 → 0
View
src/report/Batcher.java 100644 → 0
View
src/report/FeedbackReportGenerator.java 100644 → 0
View
src/report/SendReport.java 100644 → 0
View
src/schema.sql 100644 → 0
View
src/ui/CategoryPanel.java 100644 → 0
View
src/ui/CriterionPanel.java 100644 → 0
View
src/ui/MarkingFrame.java 100644 → 0
View
src/ui/PasswordDialog.form 100644 → 0
View
src/ui/PasswordDialog.java 100644 → 0
View
src/ui/RadioGroup.java 100644 → 0
View
src/ui/SubmissionFrame.form 100644 → 0
View
src/ui/SubmissionFrame.java 100644 → 0
View
testing/lib 120000 → 0
View
testing/marking.properties 100644 → 0