diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91ebd87606..c5f2cf9f19 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ concurrency: jobs: build: name: Build Job ubuntu-latest - Java 17 - runs-on: macos-15 + runs-on: ubuntu-latest steps: - name: Checkout Repo diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ce96f87455..6afc875814 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -16,7 +16,7 @@ concurrency: jobs: analyze: name: Analyze - runs-on: macos-15 + runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/integration-tests-benchmarks.yml b/.github/workflows/integration-tests-benchmarks.yml index 3d93efcf11..c04d2bc624 100644 --- a/.github/workflows/integration-tests-benchmarks.yml +++ b/.github/workflows/integration-tests-benchmarks.yml @@ -18,7 +18,7 @@ concurrency: jobs: test: name: Benchmarks - runs-on: macos-15 + runs-on: ubuntu-latest # we copy the secret to the env variable in order to access it in the workflow env: @@ -67,7 +67,7 @@ jobs: config-file: .sauce/sentry-uitest-android-benchmark-lite.yml app-metrics: - runs-on: macos-15 + runs-on: ubuntu-latest # we copy the secret to the env variable in order to access it in the workflow env: diff --git a/.github/workflows/integration-tests-ui-critical.yml b/.github/workflows/integration-tests-ui-critical.yml index bcff537f17..112dc8ad25 100644 --- a/.github/workflows/integration-tests-ui-critical.yml +++ b/.github/workflows/integration-tests-ui-critical.yml @@ -20,7 +20,7 @@ env: jobs: build: name: Build - runs-on: macos-15 + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 @@ -49,7 +49,7 @@ jobs: run-maestro-tests: name: Run Tests for API Level ${{ matrix.api-level }} needs: build - runs-on: macos-15 + runs-on: ubuntu-latest strategy: # we want that the matrix keeps running, default is to cancel them if it fails. fail-fast: false diff --git a/.github/workflows/integration-tests-ui.yml b/.github/workflows/integration-tests-ui.yml index 56f7dfcf57..0bf4b12dd6 100644 --- a/.github/workflows/integration-tests-ui.yml +++ b/.github/workflows/integration-tests-ui.yml @@ -12,7 +12,7 @@ concurrency: jobs: test: name: Ui tests - runs-on: macos-15 + runs-on: ubuntu-latest # we copy the secret to the env variable in order to access it in the workflow env: diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 9d83936b27..4de0e49e1a 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -11,7 +11,7 @@ concurrency: jobs: release: name: Build release artifacts - runs-on: macos-15 + runs-on: ubuntu-latest steps: - name: Checkout Repo diff --git a/Makefile b/Makefile index 62e6e258f3..3fff2c01ff 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ publish: clean dryRelease # deep clean clean: - ./gradlew clean + ./gradlew clean --no-configuration-cache rm -rf distributions # build and run tests @@ -20,7 +20,7 @@ javadocs: # do a dry release (like a local deploy) dryRelease: - ./gradlew aggregateJavadocs distZip --no-build-cache + ./gradlew aggregateJavadocs distZip --no-build-cache --no-configuration-cache # check for dependencies update update: diff --git a/build.gradle.kts b/build.gradle.kts index 7c749a9d5c..bb60529161 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -250,48 +250,46 @@ spotless { } } -gradle.projectsEvaluated { - tasks.create("aggregateJavadocs", Javadoc::class.java) { - setDestinationDir(project.layout.buildDirectory.file("docs/javadoc").get().asFile) - title = "${project.name} $version API" - val opts = options as StandardJavadocDocletOptions - opts.quiet() - opts.encoding = "UTF-8" - opts.memberLevel = JavadocMemberLevel.PROTECTED - opts.stylesheetFile(file("$projectDir/docs/stylesheet.css")) - opts.links = listOf( - "https://docs.oracle.com/javase/8/docs/api/", - "https://docs.spring.io/spring-framework/docs/current/javadoc-api/", - "https://docs.spring.io/spring-boot/docs/current/api/" - ) - subprojects - .filter { !it.name.contains("sample") && !it.name.contains("integration-tests") } - .forEach { proj -> - proj.tasks.withType().forEach { javadocTask -> - source += javadocTask.source - classpath += javadocTask.classpath - excludes += javadocTask.excludes - includes += javadocTask.includes - } +tasks.register("aggregateJavadocs", Javadoc::class.java) { + setDestinationDir(project.layout.buildDirectory.file("docs/javadoc").get().asFile) + title = "${project.name} $version API" + val opts = options as StandardJavadocDocletOptions + opts.quiet() + opts.encoding = "UTF-8" + opts.memberLevel = JavadocMemberLevel.PROTECTED + opts.stylesheetFile(file("$projectDir/docs/stylesheet.css")) + opts.links = listOf( + "https://docs.oracle.com/javase/8/docs/api/", + "https://docs.spring.io/spring-framework/docs/current/javadoc-api/", + "https://docs.spring.io/spring-boot/docs/current/api/" + ) + subprojects + .filter { !it.name.contains("sample") && !it.name.contains("integration-tests") } + .forEach { proj -> + proj.tasks.withType().forEach { javadocTask -> + source += javadocTask.source + classpath += javadocTask.classpath + excludes += javadocTask.excludes + includes += javadocTask.includes } - } + } +} - tasks.create("buildForCodeQL") { - subprojects - .filter { - !it.displayName.contains("sample") && - !it.displayName.contains("integration-tests") && - !it.displayName.contains("bom") && - it.name != "sentry-opentelemetry" - } - .forEach { proj -> - if (proj.plugins.hasPlugin("com.android.library")) { - this.dependsOn(proj.tasks.findByName("compileReleaseUnitTestSources")) - } else { - this.dependsOn(proj.tasks.findByName("testClasses")) - } +tasks.register("buildForCodeQL") { + subprojects + .filter { + !it.displayName.contains("sample") && + !it.displayName.contains("integration-tests") && + !it.displayName.contains("bom") && + it.name != "sentry-opentelemetry" + } + .forEach { proj -> + if (proj.plugins.hasPlugin("com.android.library")) { + this.dependsOn(proj.tasks.findByName("compileReleaseUnitTestSources")) + } else { + this.dependsOn(proj.tasks.findByName("testClasses")) } - } + } } // Workaround for https://youtrack.jetbrains.com/issue/IDEA-316081/Gradle-8-toolchain-error-Toolchain-from-executable-property-does-not-match-toolchain-from-javaLauncher-property-when-different diff --git a/gradle.properties b/gradle.properties index 33e2000636..39c9cb9985 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,8 @@ org.gradle.jvmargs=-Xmx12g -XX:MaxMetaspaceSize=4g -XX:+CrashOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC org.gradle.caching=true org.gradle.parallel=true +org.gradle.configureondemand=true +org.gradle.configuration-cache=true # Daemons workers org.gradle.workers.max=2