Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.

Commit 14dc88d

Browse files
martinschaefMartin Schaef
andauthored
switching build logic to gradle (#5)
Co-authored-by: Martin Schaef <schaef@amazon.com>
1 parent abaace3 commit 14dc88d

9 files changed

Lines changed: 332 additions & 52 deletions

File tree

.github/workflows/codeguru-reviewer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
name: Analyze with CodeGuru Reviewer
3-
on: [push]
3+
on: [pull_request, workflow_dispatch]
44
permissions:
55
id-token: write
66
contents: read
@@ -29,16 +29,16 @@ jobs:
2929
java-version: 1.8
3030
- name: Build with Maven
3131
if: steps.iam-role.outcome == 'success'
32-
run: mvn package -DskipTests
32+
run: ./gradlew jar
3333

3434
- name: Run CodeGuru Reviewer
3535
if: steps.iam-role.outcome == 'success'
3636
id: codeguru
3737
uses: aws-actions/codeguru-reviewer@v1.1
3838
continue-on-error: false
3939
with:
40-
s3_bucket: codeguru-reviewer-github-profiler-demo-048169001733-uw2
41-
build_path: ./target
40+
s3_bucket: codeguru-reviewer-build-artifacts-048169001733-us-west-2
41+
build_path: ./build/libs
4242

4343
- name: Store SARIF file
4444
if: steps.iam-role.outcome == 'success' && steps.codeguru.outcome == 'success'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Please refer to the blog for the detailed instructions including [Github Actions
77

88
To set up CodeGuru Reviewer for your CI/CD workflow, take a look at this [CDK example](https://github.com/aws-samples/aws-codeguru-reviewer-cicd-cdk-sample).
99

10+
To scan this package from your machine consider using the [CodeGuru Reviewer CLI](https://github.com/aws/aws-codeguru-cli).
1011

1112

1213
## Security

build.gradle

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
buildscript {
3+
repositories {
4+
maven {
5+
url "https://plugins.gradle.org/m2/"
6+
}
7+
}
8+
dependencies {
9+
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.3"
10+
}
11+
}
12+
13+
plugins {
14+
id 'java'
15+
id 'checkstyle'
16+
}
17+
18+
sourceCompatibility = 1.8
19+
targetCompatibility = 1.8
20+
21+
apply plugin: 'com.github.spotbugs'
22+
23+
checkstyle {
24+
sourceSets = [sourceSets.main]
25+
ignoreFailures = false
26+
}
27+
28+
spotbugs {
29+
ignoreFailures.set(false)
30+
}
31+
32+
repositories {
33+
mavenCentral()
34+
}
35+
36+
defaultTasks('jar')
37+
38+
dependencies {
39+
implementation 'com.amazonaws:aws-lambda-java-core:1.2.0'
40+
implementation 'com.amazonaws:aws-lambda-java-events:2.2.6'
41+
implementation 'com.amazonaws:aws-java-sdk-s3:1.11.624'
42+
implementation 'org.apache.commons:commons-lang3:3.8'
43+
implementation 'javax.servlet:javax.servlet-api:3.0.1'
44+
}
45+

gradle/wrapper/gradle-wrapper.jar

57.8 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

gradlew

Lines changed: 185 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)