Fix gradle build files to work without nexus repository credentials

android-scanner
Tal Moran 2017-01-25 19:10:18 +02:00
parent 06526a16db
commit b360ae81bb
9 changed files with 83 additions and 54 deletions

View File

@ -25,8 +25,11 @@ ext {
// Credentials for IDC nexus repositories (needed only for using unstable repositories and publishing)
// Should be set in ${HOME}/.gradle/gradle.properties
nexusUser = project.hasProperty('nexusUser') ? project.property('nexusUser') : ""
nexusPassword = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : ""
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "TODO: Add a description"
@ -207,12 +210,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -16,6 +16,11 @@ ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "Meerkat Voting Common Library"
@ -196,12 +201,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -21,7 +21,12 @@ apply plugin: 'maven-publish'
ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "Bulletin-board server web application"
@ -179,25 +184,10 @@ if (project.hasProperty('mainClassName') && (mainClassName != null)) {
*===================================*/
repositories {
// Prefer the local nexus repository (it may have 3rd party artifacts not found in mavenCentral)
maven {
url nexusRepository
if (isSnapshot) {
credentials { username
password
username nexusUser
password nexusPassword
}
}
}
// Use local maven repository
mavenLocal()
jcenter()
//jcenter()
// Use 'maven central' for other dependencies.
mavenCentral()
@ -233,12 +223,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -20,10 +20,16 @@ apply plugin: 'maven-publish'
ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "TODO: Add a description"
description = "Distributed key generation code"
// Your project version
version = "0.0"
@ -181,12 +187,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -19,7 +19,12 @@ mainClassName='Demo'
ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "Meerkat Voting Common Library"
@ -46,7 +51,7 @@ dependencies {
compile 'com.google.guava:guava:15.0'
// Crypto
compile 'org.factcenter.qilin:qilin:1.3.+'
compile 'org.factcenter.qilin:qilin:1.2.+'
compile 'org.bouncycastle:bcprov-jdk15on:1.53'
testCompile 'junit:junit:4.+'
@ -188,12 +193,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -20,7 +20,12 @@ mainClassName='meerkat.mixer.main.Mix'
ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "Mix network implementation"
@ -166,12 +171,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -21,7 +21,12 @@ apply plugin: 'maven-publish'
ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "Meerkat polling-station application"
@ -157,12 +162,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -18,7 +18,12 @@ apply plugin: 'maven-publish'
ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "Common classes for implementing Meerkat's RESTful API"
@ -118,12 +123,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}

View File

@ -19,7 +19,12 @@ apply plugin: 'maven-publish'
ext { isSnapshot = false }
ext {
groupId = 'org.factcenter.meerkat'
groupId = 'org.factcenter.meerkat'
// Credentials for publishing repositories
publishRepository = "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
publishUser = project.hasProperty('publishUser') ? project.property('publishUser') : ""
publishPassword = project.hasProperty('publishPassword') ? project.property('publishPassword') : ""
}
description = "Meerkat voting booth application"
@ -160,12 +165,12 @@ publishing {
}
repositories {
maven {
url "https://cs.idc.ac.il/nexus/content/repositories/${project.isSnapshot ? 'snapshots' : 'releases'}"
url publishRepository
credentials { username
password
username nexusUser
password nexusPassword
username publishUser
password publishPassword
}
}
}