Skip to content

Instantly share code, notes, and snippets.

@ShaunPlummer
Created July 26, 2016 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShaunPlummer/46d6dfd4d3e4019d3d4988c841e4aa28 to your computer and use it in GitHub Desktop.
Save ShaunPlummer/46d6dfd4d3e4019d3d4988c841e4aa28 to your computer and use it in GitHub Desktop.
Minimal build script to package a runnable jar of a command line application
apply plugin: 'java'
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Project Name',
'Implementation-Version': version,
'Main-Class': 'package.className'
}
}
@ShaunPlummer
Copy link
Author

Changing the version to an int and the package.className to reflect the project. For example if the Main.java is under the java directory use 'Main-Class': 'Main'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment