Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions cadc-cdp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'application'
id 'checkstyle'
}

repositories {
mavenCentral()
mavenLocal()
}

apply from: '../opencadc.gradle'

sourceCompatibility = 11

group = 'org.opencadc'
Expand All @@ -21,9 +24,10 @@ def git_url = 'https://github.com/opencadc/cdp'
mainClassName = 'ca.nrc.cadc.cred.client.Main'

dependencies {
implementation 'xerces:xercesImpl:[2.12.1,3.0)'
implementation 'org.bouncycastle:bcprov-jdk18on:[1.70,2.0)'
implementation 'org.bouncycastle:bcpkix-jdk18on:[1.70,2.0)'
// control the BC version here
api 'org.bouncycastle:bcprov-jdk18on:[1.70,2.0)'
api 'org.bouncycastle:bcpkix-jdk18on:[1.70,2.0)'

implementation 'org.opencadc:cadc-util:[1.11,)'
implementation 'org.opencadc:cadc-registry:[1.4,)'
implementation 'javax.servlet:javax.servlet-api:3.1.0'
Expand Down
3 changes: 1 addition & 2 deletions cred/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ dependencies {
implementation 'org.opencadc:cadc-vosi:[1.4.9,)'
implementation 'org.opencadc:cadc-log:[1.2.1,)'
implementation 'org.opencadc:cadc-cdp:[1.4.0,)'

runtimeOnly 'org.opencadc:cadc-registry:[1.7.6,)'
implementation 'org.opencadc:cadc-registry:[1.7.6,)'
runtimeOnly 'org.opencadc:cadc-gms:[1.0.12,)'
runtimeOnly 'org.opencadc:cadc-access-control-identity:[1.2.5,)'

Expand Down
File renamed without changes.
File renamed without changes.
36 changes: 25 additions & 11 deletions opencadc.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
configurations {
checkstyleDep
intTestCompile.extendsFrom testCompile
intTestRuntime.extendsFrom testRuntime
intTestImplementation.extendsFrom testImplementation

runtimeOnly.exclude module: 'slf4j-reload4j'
runtimeOnly.exclude module: 'reload4j'
}

dependencies {
testCompile 'com.puppycrawl.tools:checkstyle:8.2'
checkstyleDep 'org.opencadc:cadc-quality:[1.0,)'
testImplementation 'com.puppycrawl.tools:checkstyle:8.2'
checkstyleDep 'org.opencadc:cadc-quality:[1.0,1.1)'
}

checkstyle {
Expand All @@ -17,26 +19,22 @@ checkstyle {
}

sourceSets {
test {
resources.srcDirs += 'src/test/resources'
}
intTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
runtimeClasspath += compileClasspath
}
resources.srcDir file('src/intTest/resources')
resources.srcDirs += file('src/intTest/resources')
resources.srcDirs += new File(System.getenv('A') + '/test-certificates/')
}
}

// Temporary work around for issue https://github.com/gradle/gradle/issues/881 -
// gradle not displaying fail build status when warnings reported -->

tasks.withType(Checkstyle).each { checkstyleTask ->
checkstyleTask.doLast {
reports.all { report ->
def outputFile = report.destination
def outputFile = report.outputLocation.get().asFile
if (outputFile.exists() && outputFile.text.contains("<error ")) {
throw new GradleException("There were checkstyle warnings! For more info check $outputFile")
}
Expand Down Expand Up @@ -76,3 +74,19 @@ intTest {
// "STARTED",
}
}

pluginManager.withPlugin('maven-publish') {
// configure maven-publish to support publishToMavenLocal
publishing {
publications {
thisLibrary(MavenPublication) {
from components.java
}
}
}
}

// backwards compat usage
task install {
dependsOn 'publishToMavenLocal'
}