Updated voting-booth-gui build script to work without local nexus repository
parent
355ea1758b
commit
ea8813bade
Binary file not shown.
Before Width: | Height: | Size: 973 B |
|
@ -14,19 +14,18 @@ apply plugin: 'maven-publish'
|
||||||
// (this will also allow you to build a "fatCapsule" which includes
|
// (this will also allow you to build a "fatCapsule" which includes
|
||||||
// the entire application, including all dependencies in a single jar)
|
// the entire application, including all dependencies in a single jar)
|
||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
mainClassName='meerkat.voting.gui.Main'
|
mainClassName='meerkat.voting.gui.VotingBoothToyGraphicalRun'
|
||||||
|
|
||||||
// Is this a snapshot version?
|
// Is this a snapshot version?
|
||||||
ext { isSnapshot = false }
|
ext { isSnapshot = false }
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
groupId = 'org.factcenter.meerkat'
|
groupId = 'org.factcenter.meerkat'
|
||||||
nexusRepository = "https://cs.idc.ac.il/nexus/content/groups/${isSnapshot ? 'unstable' : 'public'}/"
|
|
||||||
|
// Credentials for publishing repositories
|
||||||
// Credentials for IDC nexus repositories (needed only for using unstable repositories and publishing)
|
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
|
||||||
// Should be set in ${HOME}/.gradle/gradle.properties
|
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
|
||||||
nexusUser = project.hasProperty('nexusUser') ? project.property('nexusUser') : ""
|
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
|
||||||
nexusPassword = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "GUI for voting booth"
|
description = "GUI for voting booth"
|
||||||
|
@ -35,12 +34,12 @@ description = "GUI for voting booth"
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
version += "${isSnapshot ? '-SNAPSHOT' : ''}"
|
version += "${isSnapshot ? '-SNAPSHOT' : ''}"
|
||||||
|
//
|
||||||
repositories {
|
//repositories {
|
||||||
flatDir {
|
// flatDir {
|
||||||
dirs '/src/main/resources/jars'
|
// dirs '/src/main/resources/jars'
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Meerkat common
|
// Meerkat common
|
||||||
|
@ -138,10 +137,7 @@ idea {
|
||||||
/*===================================
|
/*===================================
|
||||||
* "Fat" Build targets
|
* "Fat" Build targets
|
||||||
*===================================*/
|
*===================================*/
|
||||||
|
|
||||||
task printProps << {
|
|
||||||
println fatmain
|
|
||||||
}
|
|
||||||
|
|
||||||
if (project.hasProperty('mainClassName') && (mainClassName != null)) {
|
if (project.hasProperty('mainClassName') && (mainClassName != null)) {
|
||||||
|
|
||||||
|
@ -156,19 +152,17 @@ if (project.hasProperty('mainClassName') && (mainClassName != null)) {
|
||||||
|
|
||||||
destinationDir = buildDir
|
destinationDir = buildDir
|
||||||
|
|
||||||
def fatMain
|
def fatMain = hasProperty('fatmain') ? fatmain : mainClassName
|
||||||
|
|
||||||
if (this.hasProperty('fatmain')) {
|
|
||||||
fatMain = fatmain
|
|
||||||
appendix = "fat-${fatMain}"
|
|
||||||
} else {
|
|
||||||
fatMain = mainClassName
|
|
||||||
appendix = "fat"
|
|
||||||
}
|
|
||||||
|
|
||||||
applicationClass fatMain
|
applicationClass fatMain
|
||||||
|
|
||||||
def testJar = this.hasProperty('test')
|
def testJar = hasProperty('test')
|
||||||
|
|
||||||
|
if (hasProperty('fatmain')) {
|
||||||
|
appendix = "fat-${fatMain}"
|
||||||
|
} else {
|
||||||
|
appendix = "fat"
|
||||||
|
}
|
||||||
|
|
||||||
if (testJar) {
|
if (testJar) {
|
||||||
from sourceSets.test.output
|
from sourceSets.test.output
|
||||||
|
@ -176,45 +170,32 @@ if (project.hasProperty('mainClassName') && (mainClassName != null)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===================================
|
/*===================================
|
||||||
* Repositories
|
* Repositories
|
||||||
*===================================*/
|
*===================================*/
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
// Use local maven repository
|
||||||
// Prefer the local nexus repository (it may have 3rd party artifacts not found in mavenCentral)
|
mavenLocal()
|
||||||
maven {
|
|
||||||
url nexusRepository
|
|
||||||
|
|
||||||
if (isSnapshot) {
|
|
||||||
credentials { username
|
|
||||||
password
|
|
||||||
|
|
||||||
username nexusUser
|
// Use 'maven central' for other dependencies.
|
||||||
password nexusPassword
|
mavenCentral()
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use local maven repository
|
|
||||||
mavenLocal()
|
|
||||||
|
|
||||||
// Use 'maven central' for other dependencies.
|
|
||||||
mavenCentral()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task "info" << {
|
task "info" {
|
||||||
|
doLast {
|
||||||
println "Project: ${project.name}"
|
println "Project: ${project.name}"
|
||||||
println "Description: ${project.description}"
|
println "Description: ${project.description}"
|
||||||
println "--------------------------"
|
println "--------------------------"
|
||||||
println "GroupId: $groupId"
|
println "GroupId: $groupId"
|
||||||
println "Version: $version (${isSnapshot ? 'snapshot' : 'release'})"
|
println "Version: $version (${isSnapshot ? 'snapshot' : 'release'})"
|
||||||
println ""
|
println ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
info.description 'Print some information about project parameters'
|
info.description 'Print some information about project parameters'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*===================================
|
/*===================================
|
||||||
* Publishing
|
* Publishing
|
||||||
*===================================*/
|
*===================================*/
|
||||||
|
@ -232,12 +213,12 @@ publishing {
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
|
url publishRepository
|
||||||
credentials { username
|
credentials { username
|
||||||
password
|
password
|
||||||
|
|
||||||
username nexusUser
|
username publishUser
|
||||||
password nexusPassword
|
password publishPassword
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,3 +226,4 @@ publishing {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue