Re-organized into two submodules: service and uploader.
Moved all the existing service code into the `service` submodule. Stubbed out project and GUI frame for the uploader. Idea is to have a GUI that infers all the correct meta-data from media tag values and creates service, songs, and performance records appropriately based on the tagged mp3/ogg files of the performances.
This commit is contained in:
24
uploader/build.gradle
Normal file
24
uploader/build.gradle
Normal file
@ -0,0 +1,24 @@
|
||||
apply plugin: 'groovy'
|
||||
apply plugin: 'application'
|
||||
|
||||
mainClassName = 'com.jdbernard.nlsongs.NLSongsUploader'
|
||||
|
||||
dependencies {
|
||||
compile localGroovy()
|
||||
compile 'ch.qos.logback:logback-classic:1.1.8'
|
||||
compile 'ch.qos.logback:logback-core:1.1.8'
|
||||
compile 'org.slf4j:slf4j-api:1.7.22'
|
||||
compile 'com.impossibl.pgjdbc-ng:pgjdbc-ng:0.6'
|
||||
compile 'com.zaxxer:HikariCP:2.5.1'
|
||||
compile 'com.miglayout:miglayout-swing:5.0'
|
||||
compile project(':service')
|
||||
}
|
||||
|
||||
task writeVersionFile(
|
||||
group: 'build',
|
||||
description: 'Write the version to VERSION.txt') { doLast {
|
||||
|
||||
(new File('build/classes/main/VERSION.txt')).text = version
|
||||
} }
|
||||
|
||||
build.dependsOn writeVersionFile
|
@ -0,0 +1,37 @@
|
||||
package com.jdbernard.nlsongs
|
||||
|
||||
import groovy.beans.Bindable
|
||||
import groovy.swing.SwingBuilder
|
||||
import javax.swing.JFrame
|
||||
import net.miginfocom.swing.MigLayout
|
||||
|
||||
public class NLSongsUploader {
|
||||
|
||||
public static final String VERSION =
|
||||
NLSongsUploader.getResourceAsStream('/VERSION.txt').text
|
||||
|
||||
// GUI Elements (View)
|
||||
SwingBuilder swing = new SwingBuilder()
|
||||
JFrame rootFrame
|
||||
|
||||
public static void main(String[] args) { def inst = new NLSongsUploader() }
|
||||
|
||||
public NLSongsUploader() {
|
||||
|
||||
initGui()
|
||||
rootFrame.show()
|
||||
}
|
||||
|
||||
private void initGui() {
|
||||
|
||||
swing.edtBuilder {
|
||||
this.rootFrame = frame(title: "New Life Songs Uploader ${VERSION}",
|
||||
iconImages: [imageIcon('/icon.png').image],
|
||||
preferredSize: [1024, 768], pack: true,
|
||||
layout: new MigLayout("ins 0, fill"),
|
||||
defaultCloseOperation: JFrame.EXIT_ON_CLOSE) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
uploader/src/main/resources/icon.png
Normal file
BIN
uploader/src/main/resources/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
Reference in New Issue
Block a user