Skip to content
Closed
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
11 changes: 10 additions & 1 deletion .github/workflows/java-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,16 @@ jobs:
distribution: zulu
java-version: ${{ matrix.jvm }}
- uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5 # zizmor: ignore[cache-poisoning] -- cache writes are restricted to the default branch by setup-gradle
- run: ./gradlew -DallModules build -x test -x javadoc -x integrationTest
- run: ./gradlew -DallModules build -x test -x javadoc -x integrationTest -x intTest
- name: Check all generated files are up to date
run: |
if ! git diff --exit-code; then
echo ""
echo "ERROR: Generated files are out of date!"
echo "The above diff shows files that need to be regenerated."
echo "Please run './gradlew assemble' locally and commit the updated files."
exit 1
fi

build-javadoc:
runs-on: ubuntu-24.04
Expand Down
110 changes: 110 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,43 @@ project(':iceberg-common') {
}

project(':iceberg-core') {
apply plugin: 'java-test-fixtures'
apply plugin: 'jvm-test-suite'

test {
useJUnitPlatform()
}

testing {
suites {
intTest(JvmTestSuite) {
useJUnitJupiter()
dependencies {
implementation project()
implementation testFixtures(project())
}
check.dependsOn intTest
targets {
all {
testTask.configure {
shouldRunAfter(test)
mustRunAfter(test)
}
}
}
}
}
}

configurations {
docs {
description = 'Dependencies for generating configuration documentation'
canBeResolved = true
canBeConsumed = false
visible = false
}
}

dependencies {
api project(':iceberg-api')
implementation project(':iceberg-common')
Expand All @@ -385,11 +419,16 @@ project(':iceberg-core') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}

// OAuth2
implementation libs.nimbus.oauth2.oidc.sdk
implementation libs.nimbus.jose.jwt

testImplementation libs.jetty.servlet
testImplementation libs.jakarta.servlet
testImplementation libs.jetty.server
testImplementation libs.mockserver.netty
testImplementation libs.mockserver.client.java
testImplementation libs.bouncycastle.bcpkix
testImplementation libs.sqlite.jdbc
testImplementation libs.derby.core
testImplementation libs.derby.tools
Expand All @@ -399,7 +438,78 @@ project(':iceberg-core') {
exclude group: 'junit'
}
testImplementation libs.awaitility

testFixturesApi libs.junit.jupiter
testFixturesApi libs.junit.pioneer
testFixturesApi libs.assertj.core
testFixturesApi libs.mockito.core

testFixturesApi libs.httpcomponents.httpclient5
testFixturesApi libs.nimbus.oauth2.oidc.sdk
testFixturesApi libs.nimbus.jose.jwt

testFixturesApi libs.mockserver.netty
testFixturesApi libs.mockserver.client.java

testFixturesApi libs.testcontainers
testFixturesApi libs.testcontainers.junit.jupiter
testFixturesApi libs.testcontainers.keycloak

testFixturesApi libs.keycloak.admin.client

testFixturesImplementation project(path: ':iceberg-bundled-guava', configuration: 'shadow')

testFixturesAnnotationProcessor libs.immutables.value
testFixturesCompileOnly libs.immutables.value

intTestImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') // for CatalogTests
intTestImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') // for CatalogTests
intTestImplementation project(path: ':iceberg-bundled-guava', configuration: 'shadow')

intTestImplementation libs.jetty.servlet
intTestImplementation libs.jakarta.servlet
intTestImplementation libs.jetty.server

docs 'com.thoughtworks.qdox:qdox:2.2.0'
docs project(path: ':iceberg-bundled-guava', configuration: 'shadow')
}

sourceSets {
docs {
java {
srcDir 'src/docs/java'
}
resources {
srcDir 'src/docs/resources'
}
compileClasspath += configurations.docs
runtimeClasspath += configurations.docs
}
}

tasks.named('processDocsResources', ProcessResources).configure {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

tasks.register('generateOAuth2Docs', JavaExec) {
group = 'documentation'
description = 'Generates REST OAuth2 configuration documentation from OAuth2Config'
mainClass.set('org.apache.iceberg.rest.auth.oauth2.docs.OAuth2DocumentationGenerator')
classpath = sourceSets.docs.runtimeClasspath

def inputFile = project.file('src/main/java/org/apache/iceberg/rest/auth/oauth2/OAuth2Config.java')
def outputFile = rootProject.file('docs/docs/oauth2-configuration.md')

inputs.files(inputFile)
outputs.file(outputFile)

args(inputFile.absolutePath, outputFile.absolutePath)

doFirst { outputFile.parentFile.mkdirs() }
}

assemble.dependsOn('generateOAuth2Docs')

}

project(':iceberg-data') {
Expand Down
Loading
Loading