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: 6 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
java-version: 21
- name: Build cadc-web-util with Gradle
run: cd cadc-web-util && ../gradlew -i clean build test javadoc checkstyleMain
- name: Build cadc-web-token with Gradle
Expand Down
79 changes: 71 additions & 8 deletions cadc-web-token/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ plugins {
id 'java-library'
id 'maven-publish'

// Needed to support the old install command. Remove with Gradle version >= 7
id 'maven'
// Automated code checking and documentation generation.
id 'jacoco'
id 'com.diffplug.spotless' version '6.25.0'
id 'checkstyle'
id 'org.jetbrains.dokka' version '1.6.0'
}

repositories {
Expand All @@ -22,8 +25,11 @@ repositories {
}

group = 'org.opencadc'
version = '1.1.1'
sourceCompatibility = '1.8'
version = '1.2.0'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

description = 'OpenCADC Cookie and OIDC Access Token manager'
def git_url = 'https://github.com/opencadc/web.git'
Expand All @@ -42,14 +48,71 @@ publishing {
}

dependencies {
api 'com.nimbusds:oauth2-oidc-sdk:11.12'
api 'com.nimbusds:oauth2-oidc-sdk:11.31.1'

implementation 'org.opencadc:cadc-registry:[1.7.4,2.0.0)'
implementation 'org.opencadc:cadc-util:[1.10.0,2.0.0)'
implementation 'org.apache.commons:commons-jcs3:[3.2,3.3)'
implementation 'org.opencadc:cadc-util:[1.12.14,2.0.0)'
implementation 'org.apache.commons:commons-lang3:[3.11,4.0)'
implementation 'redis.clients:jedis:[5.0.2,6.0.0)'
implementation 'redis.clients:jedis:[7.2.1,8.0.0)'

// Use JUnit test framework.
testImplementation 'junit:junit:[4.13.2, 5.0)'
}

spotless {
// Only format files changed since the specified git tag/commit
ratchetFrom('v1.0.0') // Adjust this tag as needed

java {
// Interpret all files as utf-8
encoding 'UTF-8'
// Use the default importOrder configuration
importOrder()
// Remove unused imports
removeUnusedImports()
// Google Java Format, Android Open Source Project style which uses 4 spaces for indentation
palantirJavaFormat('2.50.0').formatJavadoc(true)
// Format annotations on a single line
formatAnnotations()
}
}
check.dependsOn spotlessCheck

// Create Java Code Coverage Reports
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
check.dependsOn jacocoTestReport

// Create JavaDoc
javadoc {
destinationDir = file("${layout.buildDirectory}/docs/javadoc")
}

// Create Java Documentation using Dokka for Github Markdown and HTML
tasks.dokkaGfm.configure {
outputDirectory.set(file("${layout.buildDirectory}/docs/dokka/gfm"))
dokkaSourceSets {
register("main") {
sourceRoots.from(file("src/main/java"))
}
}
}
tasks.dokkaHtml.configure {
outputDirectory.set(file("${layout.buildDirectory}/docs/dokka/html"))
dokkaSourceSets {
register("main") {
sourceRoots.from(file("src/main/java"))
}
configureEach {
jdkVersion.set(11)
sourceLink {
localDirectory.set(file("src/main/java"))
remoteUrl.set("https://github.com/opencadc/web/tree/main/cadc-web-token/src/main/java")
}
}
}
}
Loading