Skip to content

Commit

Permalink
Fix examples build (#3899) (#3941)
Browse files Browse the repository at this point in the history
* Fix examples build

* Publish main repo artifacts locally

* Sync builds

* Fix init script?

* Fix publishing of agent-for-testing
  • Loading branch information
trask authored Aug 25, 2021
1 parent a934914 commit 2991cd2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 25 deletions.
14 changes: 5 additions & 9 deletions .github/scripts/local.init.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
addListener(object : BuildAdapter() {
override fun projectsEvaluated(gradle: Gradle) {
gradle.rootProject {
repositories {
mavenLocal()
removeIf { it.name == "sonatype" }
}
}
allprojects {
repositories {
mavenLocal()
removeIf { it.name == "sonatype" }
}
})
}
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
- 11
- 15
vm:
- hotspot
- openj9
- hotspot
- openj9
fail-fast: false
steps:
- uses: actions/[email protected]
Expand Down Expand Up @@ -192,12 +192,15 @@ jobs:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('examples/distro/gradle/wrapper/gradle-wrapper.properties') }}

- name: Local publish
run: ./gradlew publishToMavenLocal

- name: Build distro
run: ./gradlew build
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts
working-directory: examples/distro

- name: Build extension
run: ./gradlew build
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts
working-directory: examples/extension

snapshot:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
- 11
- 15
vm:
- hotspot
- openj9
- hotspot
- openj9
fail-fast: false
steps:
- uses: actions/[email protected]
Expand Down Expand Up @@ -233,12 +233,15 @@ jobs:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('examples/distro/gradle/wrapper/gradle-wrapper.properties') }}

- name: Local publish
run: ./gradlew publishToMavenLocal

- name: Build distro
run: ./gradlew build
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts
working-directory: examples/distro

- name: Build extension
run: ./gradlew build
run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts
working-directory: examples/extension

accept-pr:
Expand Down
8 changes: 4 additions & 4 deletions examples/distro/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ subprojects {

ext {
versions = [
opentelemetry : "1.4.1",
opentelemetryAlpha : "1.4.1-alpha",
opentelemetryJavaagent : "1.5.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "1.5.0-alpha-SNAPSHOT",
opentelemetry : "1.5.0",
opentelemetryAlpha : "1.5.0-alpha",
opentelemetryJavaagent : "1.6.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "1.6.0-alpha-SNAPSHOT",
bytebuddy : "1.10.18",
guava : "30.1-jre"
]
Expand Down
8 changes: 4 additions & 4 deletions examples/extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ version '1.0'

ext {
versions = [
opentelemetry : "1.4.1",
opentelemetryAlpha : "1.4.1-alpha",
opentelemetryJavaagent : "1.5.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "1.5.0-alpha-SNAPSHOT",
opentelemetry : "1.5.0",
opentelemetryAlpha : "1.5.0-alpha",
opentelemetryJavaagent : "1.6.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "1.6.0-alpha-SNAPSHOT",
]

deps = [
Expand Down

0 comments on commit 2991cd2

Please sign in to comment.