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
1,101 changes: 1,101 additions & 0 deletions .fossa.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/repository-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ settings](https://github.com/open-telemetry/community/blob/main/docs/how-to-conf

### Organization secrets

- `FOSSA_API_KEY`
- `OPENTELEMETRYBOT_GITHUB_TOKEN`
- `OTELBOT_CLIENT_ID`
- `OTELBOT_PRIVATE_KEY`
25 changes: 25 additions & 0 deletions .github/scripts/generate-fossa-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash -e

modules=$(grep "^include(" settings.gradle.kts \
| grep -E "(:testing|-testing|:smoke-tests)" \
| sed 's/^include(\"//' \
| sed 's/")$//')

echo "version: 3"
echo
echo "targets:"
echo " only:"
echo " # these modules are not published and so consumers will not be exposed to them"

for module in $modules; do
echo " - type: gradle"
echo " path: ./"
echo " target: '$module'"
done

echo
echo "experimental:"
echo " gradle:"
echo " configurations-only:"
echo " # consumer will only be exposed to these dependencies"
echo " - runtimeClasspath"
19 changes: 19 additions & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: FOSSA

on:
push:
branches:
- main

permissions:
contents: read

jobs:
fossa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
with:
api-key: ${{secrets.FOSSA_API_KEY}}
49 changes: 49 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,52 @@ if (gradle.startParameter.taskNames.contains("listTestsInPartition")) {
}
}
}

if (gradle.startParameter.taskNames.contains("writeFossaConfig")) {
tasks {
val writeFossaConfig by registering {
group = "Help"
description = "Write .fossa.yml config file"

doLast {
File(".fossa.yml").printWriter().use { writer ->
writer.println("version: 3")
writer.println()
writer.println("targets:")
writer.println(" only:")
writer.println(" # only scanning the modules which are published")
writer.println(" # (as opposed to internal testing modules")
rootProject.subprojects
.sortedBy { it.findProperty("archivesName") as String? }
.filter { !it.name.startsWith("bom") }
.filter { it.plugins.hasPlugin("maven-publish") }
.forEach {
writer.println(" - type: gradle")
writer.println(" path: ./")
writer.println(" target: '${it.path}'")
}
writer.println()
writer.println("experimental:")
writer.println(" gradle:")
writer.println(" configurations-only:")
writer.println(" # consumer will only be exposed to these dependencies")
writer.println(" - runtimeClasspath")
}
}

// disable all tasks to stop build
subprojects {
tasks.configureEach {
enabled = false
}
}
}
}

// disable all tasks to stop build
project.tasks.configureEach {
if (this.name != "writeFossaConfig") {
enabled = false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ abstract class NettyAlignmentRule : ComponentMetadataRule {
with(ctx.details) {
if (id.group == "io.netty" && id.name != "netty") {
if (id.version.startsWith("4.1.")) {
belongsTo("io.netty:netty-bom:4.1.117.Final", false)
belongsTo("io.netty:netty-bom:4.1.118.Final", false)
} else if (id.version.startsWith("4.0.")) {
belongsTo("io.netty:netty-bom:4.0.56.Final", false)
}
Expand Down
21 changes: 9 additions & 12 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ plugins {

data class DependencySet(val group: String, val version: String, val modules: List<String>)

val dependencyVersions = hashMapOf<String, String>()
rootProject.extra["versions"] = dependencyVersions

// this line is managed by .github/scripts/update-sdk-version.sh
val otelSdkVersion = "1.46.0"
val otelContribVersion = "1.43.0-alpha"
Expand All @@ -27,15 +24,17 @@ val groovyVersion = "4.0.25"
// configurations.testRuntimeClasspath.resolutionStrategy.force "com.google.guava:guava:19.0"

val DEPENDENCY_BOMS = listOf(
// for some reason boms show up as runtime dependencies in license and vulnerability scans
// even if they are only used by test dependencies, so not using junit or spock boms since
// junit is LGPL (and spock depends on junit)

"com.fasterxml.jackson:jackson-bom:2.18.2",
"com.squareup.okio:okio-bom:3.10.2", // see https://github.com/open-telemetry/opentelemetry-java/issues/5637
"com.google.guava:guava-bom:33.4.0-jre",
"org.apache.groovy:groovy-bom:${groovyVersion}",
"io.opentelemetry:opentelemetry-bom:${otelSdkVersion}",
"io.opentelemetry:opentelemetry-bom-alpha:${otelSdkAlphaVersion}",
"org.junit:junit-bom:5.11.4",
"org.testcontainers:testcontainers-bom:1.20.4",
"org.spockframework:spock-bom:2.4-M5-groovy-4.0"
"org.testcontainers:testcontainers-bom:1.20.4"
)

val autoServiceVersion = "1.1.1"
Expand Down Expand Up @@ -83,6 +82,10 @@ val CORE_DEPENDENCIES = listOf(
// There are dependencies included here that appear to have no usages, but are maintained at
// this top level to help consistently satisfy large numbers of transitive dependencies.
val DEPENDENCIES = listOf(
"org.junit.jupiter:junit-jupiter-api:5.11.4",
"org.spockframework:spock-core:2.4-M5-groovy-4.0",
"org.spockframework:spock-junit4:2.4-M5-groovy-4.0",

"io.r2dbc:r2dbc-proxy:1.1.5.RELEASE",
"ch.qos.logback:logback-classic:1.3.15", // 1.4+ requires Java 11+
"com.github.stefanbirkner:system-lambda:1.2.1",
Expand Down Expand Up @@ -127,19 +130,13 @@ javaPlatform {
dependencies {
for (bom in DEPENDENCY_BOMS) {
api(enforcedPlatform(bom))
val split = bom.split(':')
dependencyVersions[split[0]] = split[2]
}
constraints {
for (dependency in CORE_DEPENDENCIES) {
api(dependency)
val split = dependency.split(':')
dependencyVersions[split[0]] = split[2]
}
for (dependency in DEPENDENCIES) {
api(dependency)
val split = dependency.split(':')
dependencyVersions[split[0]] = split[2]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ group = "io.opentelemetry.instrumentation"
val springBootVersion = "2.6.15"

dependencies {
api("org.springframework.boot:spring-boot-starter:$springBootVersion")
compileOnly("org.springframework.boot:spring-boot-starter:$springBootVersion")
api(project(":instrumentation:spring:starters:spring-boot-starter"))
api("io.opentelemetry:opentelemetry-exporter-zipkin")
}
Loading