Skip to content

Commit 947f726

Browse files
author
Michael Brewer
authored
fix(gradle): Fix gradle example and docs to work with java 12+ (#703)
* fix(gradle): Fix gradle example and docs to work with java 12+ Changes: - Bump gradle version to 7.3.3 - Use `io.freefair.aspectj.post-compile-weaving` in example project - Specify java 11 for sourceCompatibility, targetCompatibility - Bump junit version to 4.13.2 closes #702 * fix: no need to include implementation
1 parent 6e4c268 commit 947f726

File tree

4 files changed

+17
-22
lines changed

4 files changed

+17
-22
lines changed

docs/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ For more information about the project and available options refer to this [repo
118118
aspect 'software.amazon.lambda:powertools-tracing:{{ powertools.version }}'
119119
aspect 'software.amazon.lambda:powertools-metrics:{{ powertools.version }}'
120120
}
121+
122+
sourceCompatibility = 11
123+
targetCompatibility = 11
121124
```
122125

123126
## Environment variables
+12-20
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
plugins{
22
id 'java'
3-
id 'aspectj.AspectjGradlePlugin' version '0.0.7'
3+
id 'io.freefair.aspectj.post-compile-weaving' version '6.3.0'
44
}
55

66
repositories {
77
mavenCentral()
88
}
99

1010
dependencies {
11-
implementation 'software.amazon.lambda:powertools-tracing:1.10.2'
12-
aspectpath 'software.amazon.lambda:powertools-tracing:1.10.2'
13-
14-
implementation 'software.amazon.lambda:powertools-logging:1.10.2'
15-
aspectpath 'software.amazon.lambda:powertools-logging:1.10.2'
16-
17-
implementation 'software.amazon.lambda:powertools-metrics:1.10.2'
18-
aspectpath 'software.amazon.lambda:powertools-metrics:1.10.2'
19-
20-
implementation 'software.amazon.lambda:powertools-sqs:1.10.2'
21-
aspectpath 'software.amazon.lambda:powertools-sqs:1.10.2'
22-
23-
implementation 'software.amazon.lambda:powertools-parameters:1.10.2'
24-
aspectpath 'software.amazon.lambda:powertools-parameters:1.10.2'
25-
26-
implementation 'software.amazon.lambda:powertools-validation:1.10.2'
27-
aspectpath 'software.amazon.lambda:powertools-validation:1.10.2'
11+
aspect 'software.amazon.lambda:powertools-logging:1.10.2'
12+
aspect 'software.amazon.lambda:powertools-tracing:1.10.2'
13+
aspect 'software.amazon.lambda:powertools-metrics:1.10.2'
14+
aspect 'software.amazon.lambda:powertools-sqs:1.10.2'
15+
aspect 'software.amazon.lambda:powertools-parameters:1.10.2'
16+
aspect 'software.amazon.lambda:powertools-validation:1.10.2'
2817

2918
implementation 'com.amazonaws:aws-lambda-java-core:1.2.1'
3019
implementation 'com.amazonaws:aws-lambda-java-events:3.1.0'
3120

3221
implementation 'org.apache.logging.log4j:log4j-api:2.16.0'
3322
implementation 'org.apache.logging.log4j:log4j-core:2.16.0'
3423

35-
testImplementation 'junit:junit:4.12'
36-
}
24+
testImplementation 'junit:junit:4.13.2'
25+
}
26+
27+
sourceCompatibility = 11
28+
targetCompatibility = 11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

example/HelloWorldFunction/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<dependency>
7373
<groupId>junit</groupId>
7474
<artifactId>junit</artifactId>
75-
<version>4.13.1</version>
75+
<version>4.13.2</version>
7676
<scope>test</scope>
7777
</dependency>
7878
</dependencies>

0 commit comments

Comments
 (0)