Skip to content

Commit

Permalink
submit metadata to github's dependency submission api
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Sep 3, 2022
1 parent 991e66e commit f0a47d5
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 11 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Dependency Submission
on:
push:
branches: [master]
permissions: read-all

env:
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
JAVA_VERSION: 18

jobs:
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@dd2c410b088af7c0dc8046f3ac9a8f4148492a95
with:
egress-policy: audit
- uses: actions/checkout@v3
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: Wandalen/wretry.action@v1.0.20
timeout-minutes: 5
with:
action: actions/setup-java@v3
with: |
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
attempt_limit: 3
attempt_delay: 2000
- name: Setup Gradle
uses: Wandalen/wretry.action@v1.0.20
timeout-minutes: 5
with:
action: gradle/gradle-build-action@v2
with: |
cache-read-only: false
arguments: help --no-scan
generate-job-summary: false
attempt_limit: 3
attempt_delay: 2000
- name: Submit Dependency Graph
uses: mikepenz/gradle-dependency-submission@v0.7.1
with:
gradle-build-module: |-
:simulator
:caffeine
:jcache
:guava
sub-module-mode: INDIVIDUAL_DEEP
gradle-build-configuration: testCompileClasspath
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ subprojects {
testImplementation testLibraries.osgiCompile

testRuntimeOnly testLibraries.osgiRuntime

constraints {
implementation('org.jetbrains.kotlin:kotlin-stdlib:1.7.10+')
}
}

tasks.register('bundle', aQute.bnd.gradle.Bundle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,6 @@ public boolean containsValue(Object value) {

@Override
public @Nullable V put(K key, V value) {
requireNonNull(value);

// ensures that the removal notification is processed after the removal has completed
V oldValue = data.put(key, value);
notifyOnReplace(key, oldValue, value);
return oldValue;
Expand Down Expand Up @@ -677,8 +674,8 @@ static final class KeyIterator<K> implements Iterator<K> {
@Nullable K current;

KeyIterator(UnboundedLocalCache<K, ?> cache) {
this.cache = requireNonNull(cache);
this.iterator = cache.data.keySet().iterator();
this.cache = cache;
}

@Override
Expand Down Expand Up @@ -804,8 +801,8 @@ static final class ValuesIterator<K, V> implements Iterator<V> {
@Nullable Entry<K, V> entry;

ValuesIterator(UnboundedLocalCache<K, V> cache) {
this.cache = requireNonNull(cache);
this.iterator = cache.data.entrySet().iterator();
this.cache = cache;
}

@Override
Expand Down Expand Up @@ -937,8 +934,8 @@ static final class EntryIterator<K, V> implements Iterator<Entry<K, V>> {
@Nullable Entry<K, V> entry;

EntryIterator(UnboundedLocalCache<K, V> cache) {
this.cache = requireNonNull(cache);
this.iterator = cache.data.entrySet().iterator();
this.cache = cache;
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ext {
versions = [
akka: '2.6.19',
cache2k: '2.6.1.Final',
checkerFramework: '3.24.0',
checkerFramework: '3.25.0',
coherence: '22.06.1',
commonsCompress: '1.21',
commonsLang3: '3.12.0',
Expand All @@ -53,7 +53,7 @@ ext {
jmh: '1.35',
joor: '0.9.14',
jsr330: '1',
nullaway: '0.9.9',
nullaway: '0.9.10',
ohc: '0.6.1',
osgiComponentAnnotations: '1.5.0',
picocli: '4.6.3',
Expand Down Expand Up @@ -98,7 +98,7 @@ ext {
jmhReport: '0.9.0',
nexusPublish: '1.1.0',
nullaway: '1.3.0',
pmd: '6.48.0',
pmd: '6.49.0',
semanticVersioning: '1.1.0',
snyke: '0.4',
sonarqube: '3.4.0.2513',
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'com.gradle.enterprise' version '3.10.3'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.7.2'
id 'com.gradle.enterprise' version '3.11.1'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.8'
}

gradleEnterprise {
Expand Down

0 comments on commit f0a47d5

Please sign in to comment.