Compare commits

...

116 commits

Author SHA1 Message Date
Excavator Bot
92909eca41
Excavator: Upgrade gradle wrapper to the latest version (#549) 2023-02-26 16:26:36 +00:00
Excavator Bot
d2ab1a8399
Excavator: Update gradle-jdks infrastructure plugins (#548) 2023-02-20 14:10:29 +00:00
Excavator Bot
004edc9419
Excavator: Update gradle-jdks infrastructure plugins (#547) 2023-02-15 13:54:25 +00:00
Excavator Bot
ee5ed04e2d
Excavator: Upgrade buildscript dependencies (#546) 2023-02-14 06:00:56 +00:00
Excavator Bot
1a17ee9a4d
Excavator: Update gradle-jdks infrastructure plugins (#545) 2023-02-13 21:53:45 +00:00
Excavator Bot
1eef78c506
Excavator: Enforce that Jakarta dependency versions use the new 'jakarta' namespace, or replace it with an equivalent Java EE dependency instead (#544) 2023-02-09 23:24:33 +00:00
Excavator Bot
d469fca424
Excavator: Enforce that Jakarta dependency versions use the new 'jakarta' namespace, or replace it with an equivalent Java EE dependency instead (#543) 2023-02-08 22:16:03 +00:00
Excavator Bot
1342ce6795
Excavator: Render CircleCI file using template specified in .circleci/template.sh (#542) 2023-02-08 16:17:33 +00:00
Excavator Bot
f42ab782fb
Excavator: Enforce that Jakarta dependency versions use the new 'jakarta' namespace, or replace it with an equivalent Java EE dependency instead (#541) 2023-02-08 01:52:41 +00:00
Excavator Bot
075239cf4c
Excavator: Render CircleCI file using template specified in .circleci/template.sh (#540) 2023-02-04 11:35:35 +00:00
Excavator Bot
1e59f588f3
Excavator: Upgrades Baseline to the latest version (#539) 2023-02-01 19:21:58 +00:00
Excavator Bot
15c7cbe2ae
Excavator: Upgrades Baseline to the latest version (#538) 2023-01-30 22:15:17 +00:00
Excavator Bot
67ddee43c0
Excavator: Update gradle-jdks infrastructure plugins (#537) 2023-01-19 23:53:59 +00:00
Excavator Bot
f5c8396da0
Excavator: Update gradle-jdks infrastructure plugins (#536) 2023-01-17 18:12:26 +00:00
Excavator Bot
ec21f6b8d9
Excavator: Upgrades Baseline to the latest version (#534) 2023-01-06 19:15:25 +00:00
Excavator Bot
c8e939f45b
Excavator: Update gradle-jdks infrastructure plugins (#533) 2022-12-15 11:36:50 +00:00
Excavator Bot
fcbe858fbd
Excavator: Upgrades Baseline to the latest version (#532) 2022-12-09 04:26:03 +00:00
Excavator Bot
a2d1ccc0ce
Excavator: Upgrade buildscript dependencies (#531) 2022-12-05 06:46:57 +00:00
Excavator Bot
1a64fb2eb3
Excavator: Upgrade gradle wrapper to the latest version (#530) 2022-12-01 07:22:10 +00:00
Excavator Bot
c31352f2ef
Excavator: Update open-source publishing plugins (#529) 2022-11-18 11:57:56 +00:00
Excavator Bot
7260681ddd
Excavator: Format Java files (#528) 2022-11-12 01:29:15 +00:00
Excavator Bot
7f9cc67604
Excavator: Upgrades Baseline to the latest version (#526) 2022-10-31 17:47:28 +00:00
Excavator Bot
17a695ad4b
Excavator: Render CircleCI file using template specified in .circleci/template.sh (#522) 2022-10-24 14:32:29 +00:00
Excavator Bot
9e96d519ab
Excavator: Upgrades Baseline to the latest version (#521) 2022-10-20 17:06:31 +00:00
Excavator Bot
537ea9a652
Excavator: Upgrades Baseline to the latest version (#520) 2022-10-15 01:08:20 +00:00
Excavator Bot
f83c47a82e
Excavator: Render CircleCI file using template specified in .circleci/template.sh (#517) 2022-10-04 17:13:01 +00:00
Excavator Bot
9f79dac3c2
Excavator: Format Java files (#519) 2022-10-04 08:53:25 +00:00
Excavator Bot
8d3324ecb8
Excavator: Upgrades Baseline to the latest version (#518) 2022-10-03 19:50:08 +00:00
Excavator Bot
f5666d769c
Excavator: Render CircleCI file using template specified in .circleci/template.sh (#516) 2022-09-30 06:50:28 +00:00
Excavator Bot
754cfad122
Excavator: Upgrades Baseline to the latest version (#515) 2022-09-30 04:11:26 +00:00
Excavator Bot
a72efce7f5
Excavator: Update policy-bot config (#514) 2022-09-28 23:01:03 +00:00
Excavator Bot
b74072c553
Excavator: Upgrades Baseline to the latest version (#513) 2022-09-27 12:09:43 +00:00
Excavator Bot
6a327c2ccb
Excavator: Upgrades Baseline to the latest version (#512) 2022-09-20 23:53:34 +00:00
Excavator Bot
734a33a5b5
Excavator: Upgrades Baseline to the latest version (#511) 2022-09-20 21:16:59 +00:00
Excavator Bot
58c34f9eba
Excavator: Upgrades Baseline to the latest version (#510) 2022-09-19 19:58:31 +00:00
Excavator Bot
6bf9899b87
Excavator: Upgrades Baseline to the latest version (#509) 2022-09-16 15:57:27 +00:00
Excavator Bot
0781d4b424
Excavator: Update policy-bot config (#508) 2022-09-16 05:25:44 +00:00
Excavator Bot
198006568d
Excavator: Upgrades Baseline to the latest version (#507) 2022-09-16 02:34:58 +00:00
Excavator Bot
baa37a506e
Excavator: Upgrades Baseline to the latest version (#506) 2022-09-15 19:04:07 +00:00
Excavator Bot
6a5ceddfc0
Excavator: Upgrades Baseline to the latest version (#505) 2022-09-12 15:59:33 +00:00
Excavator Bot
4e8aec841e
Excavator: Migrate annotation processors to native gradle implementation (#504) 2022-09-08 07:23:12 +00:00
Excavator Bot
ea3a10b2ab
Excavator: Update gradle-jdks infrastructure plugins (#503) 2022-09-03 00:36:23 +00:00
Excavator Bot
ab53555b56
Excavator: Upgrades Baseline to the latest version (#502) 2022-09-02 21:28:56 +00:00
Excavator Bot
27f73ff007
Excavator: Upgrades Baseline to the latest version (#499) 2022-08-08 13:35:43 +00:00
Excavator Bot
56d622f9d9
Excavator: Upgrades Baseline to the latest version (#495) 2022-08-06 11:48:10 +00:00
Excavator Bot
4d686311ef
Excavator: Update gradle-jdks infrastructure plugins (#498) 2022-08-06 09:58:28 +00:00
Excavator Bot
45e6fbbcca
Excavator: Upgrade gradle wrapper to the latest version (#497) 2022-08-05 23:13:21 +00:00
Excavator Bot
b3ba713de9
Excavator: Format Java files (#496) 2022-08-03 16:41:05 +00:00
Excavator Bot
fa031afa43
Excavator: Upgrades Baseline to the latest version (#494) 2022-07-30 00:06:04 +00:00
Excavator Bot
6b32e9dca7
Excavator: Upgrades Baseline to the latest version (#493) 2022-07-29 17:31:12 +00:00
Excavator Bot
30f6d5bd1b
Excavator: Upgrades Baseline to the latest version (#491) 2022-07-26 11:22:03 +00:00
Excavator Bot
df7393c4b5
Excavator: Upgrade gradle wrapper to the latest version (#490) 2022-07-14 13:09:44 +00:00
Excavator Bot
8b4bce9f93
Excavator: Format Java files (#489) 2022-07-14 01:54:32 +00:00
Excavator Bot
1e7b0b56fe
Excavator: Upgrades Baseline to the latest version (#488) 2022-07-05 23:51:23 +00:00
Excavator Bot
d640c77dde
Excavator: Update open-source publishing plugins (#487) 2022-06-29 09:58:16 +00:00
Excavator Bot
d83ec6ab8b
Excavator: Update gradle-jdks infrastructure plugins (#486) 2022-06-28 08:39:59 +00:00
svc-autorelease
f72b406a33
Autorelease 0.12.0 2022-06-23 12:15:29 +00:00
Robert Kruszewski
ac1019f247
Improvement: Publish to gradle plugin portal (#485)
Publish plugins to gradle plugin portal
2022-06-23 12:15:25 +00:00
Excavator Bot
3820e4c13d
Excavator: Apply gradle-jdks to OSS projects (#484) 2022-06-20 15:25:19 +00:00
Excavator Bot
eb0f10f79b
Excavator: Render CircleCI file using template specified in .circleci/template.sh (#483) 2022-06-20 15:22:02 +00:00
Excavator Bot
126cbea108
Excavator: Upgrade gradle wrapper to the latest version (#482) 2022-06-20 15:19:38 +00:00
Nicholas Gates
2ff61c134d
Upgrade the world (#481) 2022-06-20 09:48:27 +00:00
Excavator Bot
c51e6b1a47
Excavator: Automatically convert to Circle2 (#477)
* Excavator: Automatically convert to Circle2

* Java 11

Co-authored-by: Nicholas Gates <ngates@palantir.com>
2022-06-20 11:34:34 +02:00
Excavator Bot
d548fb71d7
Excavator: Upgrade dependencies (#480) 2022-06-14 21:37:19 +00:00
Excavator Bot
d2b0546dfb
Excavator: Upgrade dependencies (#479) 2022-06-01 18:56:35 +00:00
Excavator Bot
76e8394eda
Excavator: Consistent Gradle artifact repositories (#475) 2022-05-18 05:19:54 +00:00
Excavator Bot
b3c61b2ac7
Excavator: Upgrade dependencies (#474) 2022-05-02 22:38:24 +00:00
Excavator Bot
ca57783ec2
Excavator: Upgrade Jackson to the latest stable release (#473) 2022-04-15 07:01:50 +00:00
Excavator Bot
166b19e3a3
Excavator: Upgrade dependencies (#472) 2022-04-08 08:00:33 +00:00
Excavator Bot
dd886a6d8e
Excavator: Update policy-bot config (#471) 2022-04-01 22:48:37 +00:00
Excavator Bot
fec16abdb8
Excavator: Consistent Gradle artifact repositories (#470) 2022-04-01 18:27:59 +00:00
Excavator Bot
db34e6e535
Excavator: Update policy-bot config (#466) 2022-03-02 04:36:14 +00:00
Excavator Bot
d3127d801f
Excavator: Update policy-bot config (#465) 2022-03-01 15:26:12 +00:00
Excavator Bot
fc8ceba7f5
Excavator: Upgrade dependencies (#464) 2022-02-28 23:05:12 +00:00
Excavator Bot
456fce719e
Excavator: Update policy-bot config (#463) 2022-02-14 06:11:38 +00:00
Excavator Bot
55f742cf34
Excavator: Upgrade dependencies (#462) 2022-02-08 16:28:23 +00:00
Excavator Bot
dfabe5f7b9
Excavator: Auto-label some excavator PRs (#460) 2022-01-20 11:36:59 +00:00
Sebastian Schuberth
420cb8013e
README: Update the link to Graal options and make it clickable (#459) 2022-01-13 11:27:06 +00:00
Excavator Bot
b98577c20a
Excavator: Upgrade buildscript dependencies (#457) 2021-11-25 06:56:12 +00:00
Excavator Bot
0219641878
Excavator: Upgrade dependencies (#456) 2021-11-06 04:44:45 +00:00
Jorge
813f9a85da
Support Java 17 for GraalVM 21.3.0 (#455) 2021-10-25 18:58:20 +00:00
Excavator Bot
a8510843d7
Excavator: Upgrade dependencies (#453) 2021-09-28 08:24:58 +00:00
Excavator Bot
7d09b4d2ca
Excavator: Update open-source publishing plugins (#450) 2021-09-14 23:25:56 +00:00
Excavator Bot
371cf0c09c
Excavator: Migrate annotation processors to native gradle implementation (#449) 2021-08-28 05:37:43 +00:00
Excavator Bot
456f24c086
Excavator: Update open-source publishing plugins (#448) 2021-08-20 05:38:09 +00:00
Excavator Bot
cac5ecdf88
Excavator: Upgrade dependencies (#447) 2021-08-20 02:39:20 +00:00
Excavator Bot
0c954afddf
Excavator: Upgrade dependencies (#446) 2021-08-03 22:15:29 +00:00
Excavator Bot
4dc812e292
Excavator: Upgrade dependencies (#445) 2021-07-23 07:16:08 +00:00
Excavator Bot
4ef8c9dd2c
Excavator: Upgrade buildscript dependencies (#444) 2021-07-21 22:26:02 +00:00
Excavator Bot
66ca6bc759
Excavator: Consistent Gradle artifact repositories (#443) 2021-07-21 12:08:39 +00:00
Excavator Bot
97162da0f8
Excavator: Upgrade buildscript dependencies (#441) 2021-06-22 06:29:37 +00:00
Excavator Bot
2125a3b57b
Excavator: Update policy-bot config (#440) 2021-06-20 06:38:52 +00:00
Excavator Bot
1b16aae200
Excavator: Consistent Gradle artifact repositories (#437) 2021-06-15 05:02:41 +00:00
Excavator Bot
a565d6551a
Excavator: Update open-source publishing plugins (#436) 2021-06-10 07:03:43 +00:00
Excavator Bot
2abe9e5cbd
Excavator: Migrate publishing to gradle-external-publish-plugin (#434) 2021-06-10 05:59:52 +00:00
Carter Kozak
e480e2c7eb
Remove bintray references (#435) 2021-06-09 23:10:01 -04:00
svc-autorelease
54044a6f11
Autorelease 0.8.0 2021-06-08 21:02:41 +00:00
Jorge
0e0208da7e
Support Java 16 for Graal 21.1.0 (#432) 2021-06-08 21:02:38 +00:00
Excavator Bot
3aaf741129
Excavator: Upgrade dependencies (#433) 2021-06-08 19:13:55 +00:00
Excavator Bot
8728fd190c
Excavator: Update open-source publishing plugins (#431) 2021-05-31 12:03:08 +00:00
Excavator Bot
b5024925a0
Excavator: Upgrade dependencies (#428) 2021-05-14 23:33:59 +00:00
Excavator Bot
b76212d1e8
Excavator: Upgrade gradle wrapper to the latest version (#427) 2021-05-07 13:55:26 +00:00
Excavator Bot
2484b034ae
Excavator: Upgrade dependencies (#426) 2021-05-06 19:08:04 +00:00
Excavator Bot
36f105a220
Excavator: stale-bot closes PRs after 14 days of inactivity (#425) 2021-04-30 19:29:45 +00:00
Excavator Bot
1afb81590e
Excavator: stale-bot closes PRs after 14 days of inactivity (#424) 2021-04-30 06:23:52 +00:00
Excavator Bot
6d4aa25f26
Excavator: Consistent Gradle artifact repositories (#423) 2021-04-23 14:35:15 +00:00
Excavator Bot
f57505e1e3
Excavator: Update open-source publishing plugins (#419) 2021-04-08 06:48:36 +00:00
Excavator Bot
463119b1ac
Excavator: Upgrade dependencies (#414) 2021-04-08 01:48:04 +00:00
Excavator Bot
c676f8ac0c
Excavator: Consistent Gradle artifact repositories (#418) 2021-04-07 16:38:01 +00:00
Excavator Bot
2860547770
Excavator: Upgrade gradle wrapper to the latest version (#416) 2021-04-06 13:02:11 +00:00
Excavator Bot
68b8f18f84
Excavator: Update open-source publishing plugins (#407) 2021-02-20 08:17:08 +00:00
Excavator Bot
6c9f338e17
Excavator: Upgrade buildscript dependencies (#405) 2021-02-15 23:34:34 +00:00
Excavator Bot
9e4790db41
Excavator: Upgrade buildscript dependencies (#404) 2021-02-04 01:52:53 +00:00
Excavator Bot
a4390e0cf0
Excavator: Upgrade buildscript dependencies (#403) 2021-02-02 09:54:37 +00:00
Excavator Bot
0374f38e84
Excavator: Ensure consistent gradle/publish-(jar|dist).gradle files (#402) 2021-02-02 08:04:08 +00:00
Excavator Bot
f2bd5576ba
Excavator: Upgrade buildscript dependencies (#401)
Co-authored-by: svc-excavator-bot <svc-excavator-bot@palantir.com>
2020-12-18 06:24:10 +00:00
27 changed files with 533 additions and 433 deletions

View file

@ -1,15 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
Palantir Baseline Checkstyle configuration.
Authors: Robert Fink, Brian Worth, Merrick Zoubeiri, and many other contributors. Based in part on http://checkstyle.sourceforge.net/google_style.html
Please keep checks alphabetized with one exception: "relaxed" checks are grouped together at the bottom for easier disabling.
Check-specific comments reference documents internal to Palantir and can be safely ignored or removed.
-->
--><!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>
@ -18,15 +12,6 @@
<module name="NewlineAtEndOfFile"> <!-- Java Style Guide: Line ending: LF -->
<property name="lineSeparator" value="lf"/>
</module>
<module name="RegexpHeader">
<property name="header" value="^/\*$\n^ \* \(c\) Copyright \d{4} Palantir Technologies Inc\. All rights reserved\.$"/>
<property name="fileExtensions" value=".java,.ts"/>
</module>
<module name="RegexpMultiline"> <!-- Development Practices: Writing good unit tests -->
<property name="fileExtensions" value="java"/>
<property name="format" value="@VisibleForTesting\s+(protected|public)"/>
<property name="message" value="@VisibleForTesting members should be package-private."/>
</module>
<module name="RegexpSingleline"> <!-- No reference needed as this is evident. -->
<property name="format" value="&lt;&lt;&lt;&lt;&lt;&lt;&lt;"/>
<property name="message" value="Found (&lt;&lt;&lt;&lt;&lt;&lt;&lt;), so it looks like you had a merge conflict that compiles. Please fix it."/>
@ -56,6 +41,10 @@
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<module name="LineLength"> <!-- Java Style Guide: No line-wrapping -->
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|\{@link"/>
</module>
<module name="TreeWalker">
<module name="SuppressionCommentFilter"/> <!-- baseline-gradle: README.md -->
<module name="SuppressionCommentFilter">
@ -74,7 +63,9 @@
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="AnnotationUseStyle"/> <!-- Java Style Guide: Annotations -->
<module name="AnnotationUseStyle"> <!-- Java Style Guide: Annotations -->
<property name="trailingArrayComma" value="ignore"/>
</module>
<module name="ArrayTypeStyle"/> <!-- Java Style Guide: No C-style array declarations -->
<module name="AvoidEscapedUnicodeCharacters"> <!-- Java Style Guide: Non-ASCII characters -->
<property name="allowEscapesForControlCharacters" value="true"/>
@ -86,14 +77,7 @@
</module>
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
<property name="excludes" value="
com.google.common.base.Preconditions.*,
com.palantir.logsafe.Preconditions.*,
java.util.Collections.*,
java.util.stream.Collectors.*,
org.apache.commons.lang3.Validate.*,
org.assertj.core.api.Assertions.*,
org.mockito.Mockito.*"/>
<property name="excludes" value="com.google.common.base.Preconditions.*, com.palantir.logsafe.Preconditions.*, java.util.Collections.*, java.util.stream.Collectors.*, org.apache.commons.lang3.Validate.*, org.assertj.core.api.Assertions.*, org.mockito.Mockito.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
@ -143,12 +127,12 @@
<module name="IllegalImport"> <!-- Java Coding Guidelines: Import the canonical package -->
<property name="id" value="BanShadedClasses"/>
<property name="illegalPkgs" value=".*\.(repackaged|shaded|thirdparty)"/>
<property name="regexp" value="true" />
<property name="regexp" value="true"/>
<message key="import.illegal" value="Must not import repackaged classes."/>
</module>
<module name="IllegalImport">
<property name="illegalPkgs" value="^org\.gradle\.(internal|.*\.internal)"/>
<property name="regexp" value="true" />
<property name="regexp" value="true"/>
<message key="import.illegal" value="Do not rely on gradle internal classes as these may change in minor releases - use org.gradle.api versions instead."/>
</module>
<module name="IllegalImport">
@ -201,12 +185,9 @@
<property name="separated" value="true"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>
<module name="InnerAssignment"/> <!-- Java Coding Guidelines: Inner assignments: Not used -->
<module name="LeftCurly"/> <!-- Java Style Guide: Nonempty blocks: K & R style -->
<module name="LineLength"> <!-- Java Style Guide: No line-wrapping -->
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<!-- Java Style Guide: Nonempty blocks: K & R style -->
<module name="MemberName"> <!-- Java Style Guide: Non-constant field names -->
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
<message key="name.invalidPattern" value="Member name ''{0}'' must match pattern ''{1}''."/>
@ -247,7 +228,7 @@
<message key="name.invalidPattern" value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterAssignment"/> <!-- Java Coding Guidelines: Final variables and parameters -->
<module name="ParenPad"/> <!-- Java Style Guide: Horizontal whitespace -->
<!-- Java Style Guide: Horizontal whitespace -->
<module name="RedundantImport"/> <!-- Java Style Guide: No unused imports -->
<module name="RedundantModifier"/> <!-- Java Coding Guidelines: Avoid redundant modifiers -->
<module name="RegexpSinglelineJava"> <!-- Java Coding Guidelines: Use appropriate assertion methods -->
@ -363,7 +344,7 @@
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\bCharset.defaultCharset\("/>
<property name="message" value="Use explicit charset (e.g. StandardCharsets.UTF-8) instead of default."/>
<property name="message" value="Use explicit charset (e.g. StandardCharsets.UTF_8) instead of default."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\bIOUtils\.toString\("/>
@ -372,6 +353,7 @@
<module name="RegexpSinglelineJava">
<property name="format" value="\/\/TODO|\/\/ TODO(?!\([^()\s]+\): )"/>
<property name="message" value="TODO format: // TODO(#issue): explanation"/>
<property name="ignoreCase" value="true"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="(void setUp\(\))|(void setup\(\))|(void setupStatic\(\))|(void setUpStatic\(\))|(void beforeTest\(\))|(void teardown\(\))|(void tearDown\(\))|(void beforeStatic\(\))|(void afterStatic\(\))"/>
@ -379,11 +361,11 @@
</module>
<module name="RightCurly"> <!-- Java Style Guide: Nonempty blocks: K & R style -->
<property name="option" value="same"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
</module>
<module name="RightCurly"> <!-- Java Style Guide: Nonempty blocks: K & R style -->
<property name="option" value="alone"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
<property name="tokens" value="LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
</module>
<module name="SeparatorWrap"> <!-- Java Style Guide: Where to break -->
<property name="tokens" value="DOT"/>
@ -401,28 +383,18 @@
<module name="SuppressWarnings">
<property name="format" value="serial"/>
</module>
<module name="SuppressWarningsHolder" /> <!-- Required for SuppressWarningsFilter -->
<module name="SuppressWarningsHolder"/> <!-- Required for SuppressWarningsFilter -->
<module name="TypeName"> <!-- Java Style Guide: Class names -->
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypecastParenPad"/> <!-- Java Style Guide: Horizontal whitespace -->
<module name="UnnecessaryParentheses"/>
<module name="UnusedImports"> <!-- Java Style Guide: No unused imports -->
<property name="processJavadoc" value="true"/>
</module>
<module name="UpperEll"/> <!-- Java Style Guide: Numeric Literals -->
<module name="VisibilityModifier"/> <!-- Java Coding Guidelines: Minimize mutability -->
<module name="WhitespaceAfter"/> <!-- Java Style Guide: Horizontal whitespace -->
<module name="WhitespaceAround"> <!-- Java Style Guide: Horizontal whitespace -->
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="ignoreEnhancedForColon" value="false"/>
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<!-- Stricter checks begin: delete some or all of the following for faster prototyping, but please restore before pushing to production. -->
@ -430,18 +402,17 @@
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="CyclomaticComplexity"/> <!-- Java Coding Guidelines: Reduce Cyclomatic Complexity -->
<module name="CyclomaticComplexity"> <!-- Java Coding Guidelines: Reduce Cyclomatic Complexity -->
<property name="switchBlockAsSingleDecisionPoint" value="true"/>
</module>
<module name="DesignForExtension"> <!-- Java Coding Guidelines: Design for extension -->
<property name="ignoredAnnotations" value="ParameterizedTest, Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
</module>
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="minLineCount" value="99999999"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
</module>
<module name="JavadocStyle"/> <!-- Java Style Guide: Javadoc -->
<module name="JavadocTagContinuationIndentation"> <!-- Java Style Guide: At-clauses -->
@ -474,4 +445,4 @@
<!-- Stricter checks end -->
</module>
</module>
</module>

View file

@ -8,9 +8,9 @@ org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=;
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.ondemandthreshold=999
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
org.eclipse.jdt.ui.staticondemandthreshold=999
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\n * (c) Copyright ${year} Palantir Technologies Inc. All rights reserved.\n */\n\n${package_declaration}\n\n/**\n * \n */\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">throw new RuntimeException(${exception_var});</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false

View file

@ -16,7 +16,7 @@
<option name="BINARY_OPERATION_WRAP" value="1" />
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="EXTENDS_KEYWORD_WRAP" value="1" />
<option name="EXTENDS_LIST_WRAP" value="1" />
@ -30,9 +30,10 @@
<package name="" static="false" withSubpackages="true" />
</value>
</option>
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<GroovyCodeStyleSettings>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
@ -43,6 +44,21 @@
<package name="" withSubpackages="true" static="false" />
</value>
</option>
<!-- Should be a superset of https://github.com/google/error-prone/blob/c481b3f9c2da112db36ccfcbf64e755261a127ab/core/src/main/java/com/google/errorprone/bugpatterns/BadImport.java#L63 -->
<DO_NOT_IMPORT_INNER>
<CLASS name="Builder" />
<CLASS name="BuilderFactory" />
<CLASS name="Callback" />
<CLASS name="Class" />
<CLASS name="Entry" />
<CLASS name="Enum" />
<CLASS name="Factory" />
<CLASS name="Type" />
<CLASS name="Key" />
<CLASS name="Id" />
<CLASS name="Identifier" />
<CLASS name="Provider" />
</DO_NOT_IMPORT_INNER>
</GroovyCodeStyleSettings>
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
@ -55,7 +71,7 @@
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
<option name="METHOD_CALL_CHAIN_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
<option name="OPTIMIZE_IMPORTS_ON_THE_FLY" value="true" />
<option name="OTHER_INDENT_OPTIONS">
<value>

View file

@ -1,113 +1,148 @@
version: 2
jobs:
compile:
docker: [{ image: 'circleci/openjdk:8-node' }]
resource_class: medium+
steps:
- checkout
- restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --profile --parallel --stacktrace resolveConfigurations
- save_cache:
key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}'
paths: [ ~/.gradle/wrapper ]
- save_cache:
key: 'gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}'
paths: [ ~/.gradle/caches ]
- run: ./gradlew --profile --parallel --stacktrace classes testClasses
- persist_to_workspace:
root: .
paths: [ . ]
# This file was generated by the excavator check 'excavator/manage-circleci' as specified in .circleci/template.sh.
# To request a modification to the general template, file an issue on Excavator.
# To manually manage the CircleCI configuration for this project, remove the .circleci/template.sh file.
compile-jdk11:
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: medium+
steps:
- checkout
- restore_cache: { key: 'gradle-wrapper-v2-jdk11-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-v2-jdk11-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --profile --parallel --stacktrace resolveConfigurations
- save_cache:
key: 'gradle-wrapper-v2-jdk11-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}'
paths: [ ~/.gradle/wrapper ]
- save_cache:
key: 'gradle-cache-v2-jdk11-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}'
paths: [ ~/.gradle/caches ]
- run: ./gradlew --profile --parallel --stacktrace classes testClasses
version: 2.1
jobs:
check:
docker: [{ image: 'circleci/openjdk:8-node' }]
resource_class: medium+
steps:
- attach_workspace: { at: . }
- restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- restore_cache: { key: 'graal-cache' }
- run: (sudo apt-get update || sudo apt-get update) && sudo apt-get install build-essential zlib1g-dev
- run: ./gradlew --profile --parallel --stacktrace --continue check
- save_cache:
key: 'graal-cache'
paths: [ ~/.gradle/caches/com.palantir.graal ]
- store_test_results: { path: build/test-results }
- store_artifacts: { path: build/reports/tests }
check-jdk11:
docker: [{ image: 'circleci/openjdk:11-node' }]
resource_class: medium+
docker: [{ image: 'cimg/openjdk:11.0.10-node' }]
resource_class: large
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
CIRCLE_ARTIFACTS: /home/circleci/artifacts
GRADLE_OPTS: -Dorg.gradle.workers.max=2 -Dorg.gradle.jvmargs='-Xmx2g --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
_JAVA_OPTIONS: -XX:ActiveProcessorCount=4 -XX:MaxRAM=8g -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts
steps:
- checkout
- restore_cache: { key: 'gradle-wrapper-v2-jdk11-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-v2-jdk11-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- restore_cache: { key: 'graal-cache' }
- run: (sudo apt-get update || sudo apt-get update) && sudo apt-get install build-essential zlib1g-dev
- run: ./gradlew --profile --parallel --stacktrace --continue check
- run:
name: delete_unrelated_tags
command: |
ALL_TAGS=$(git tag --points-at HEAD)
if [ -z "$ALL_TAGS" ]; then
echo "No-op as there are no tags on the current commit ($(git rev-parse HEAD))"
exit 0
fi
if [ -z "${CIRCLE_TAG:+x}" ]; then
echo "Non-tag build, deleting all tags which point to HEAD: [${ALL_TAGS/$'\n'/,}]"
echo "$ALL_TAGS" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
exit 0
fi
TAGS_TO_DELETE=$(echo "$ALL_TAGS" | grep -v "^$CIRCLE_TAG$" || :)
if [ -z "$TAGS_TO_DELETE" ]; then
echo "No-op as exactly one tag ($CIRCLE_TAG) points to HEAD"
exit 0
fi
echo "Detected tag build, deleting all tags except '$CIRCLE_TAG' which point to HEAD: [${TAGS_TO_DELETE/$'\n'/,}]"
echo "$TAGS_TO_DELETE" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
- restore_cache: { key: 'gradle-wrapper-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'check-gradle-cache-v1-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run:
name: check-setup
command: |
if [ -x .circleci/check-setup.sh ]; then
echo "Running check-setup" && .circleci/check-setup.sh && echo "check-setup complete"
fi
- run: ./gradlew --parallel --stacktrace --continue --max-workers=2 check -Porg.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_11_HOME,JAVA_15_HOME,JAVA_17_HOME,JAVA_HOME
- persist_to_workspace:
root: /home/circleci
paths: [ project ]
- save_cache:
key: 'graal-cache'
paths: [ ~/.gradle/caches/com.palantir.graal ]
- store_test_results: { path: build/test-results }
- store_artifacts: { path: build/reports/tests }
key: 'gradle-wrapper-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}'
paths: [ ~/.gradle/wrapper ]
- save_cache:
key: 'check-gradle-cache-v1-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}'
paths: [ ~/.gradle/caches ]
- run:
command: mkdir -p ~/junit && find . -type f -regex ".*/build/.*TEST.*xml" -exec cp --parents {} ~/junit/ \;
when: always
- store_test_results: { path: ~/junit }
- store_artifacts: { path: ~/artifacts }
trial-publish:
docker: [{ image: 'circleci/openjdk:8-node' }]
docker: [{ image: 'cimg/openjdk:11.0.10-node' }]
resource_class: medium
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
CIRCLE_ARTIFACTS: /home/circleci/artifacts
GRADLE_OPTS: -Dorg.gradle.workers.max=1 -Dorg.gradle.jvmargs='-Xmx2g --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
_JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -XX:MaxRAM=4g -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts
steps:
- attach_workspace: { at: . }
- restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --profile --stacktrace publishToMavenLocal
- checkout
- run:
name: delete_unrelated_tags
command: |
ALL_TAGS=$(git tag --points-at HEAD)
if [ -z "$ALL_TAGS" ]; then
echo "No-op as there are no tags on the current commit ($(git rev-parse HEAD))"
exit 0
fi
if [ -z "${CIRCLE_TAG:+x}" ]; then
echo "Non-tag build, deleting all tags which point to HEAD: [${ALL_TAGS/$'\n'/,}]"
echo "$ALL_TAGS" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
exit 0
fi
TAGS_TO_DELETE=$(echo "$ALL_TAGS" | grep -v "^$CIRCLE_TAG$" || :)
if [ -z "$TAGS_TO_DELETE" ]; then
echo "No-op as exactly one tag ($CIRCLE_TAG) points to HEAD"
exit 0
fi
echo "Detected tag build, deleting all tags except '$CIRCLE_TAG' which point to HEAD: [${TAGS_TO_DELETE/$'\n'/,}]"
echo "$TAGS_TO_DELETE" | while read -r TAG; do git tag -d "$TAG" 1>/dev/null; done
- restore_cache: { key: 'gradle-wrapper-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'trial-publish-gradle-cache-v1-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- run: ./gradlew --stacktrace publishToMavenLocal -Porg.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_11_HOME,JAVA_15_HOME,JAVA_17_HOME,JAVA_HOME
- run:
command: git status --porcelain
when: always
- save_cache:
key: 'trial-publish-gradle-cache-v1-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}'
paths: [ ~/.gradle/caches ]
- store_test_results: { path: ~/junit }
- store_artifacts: { path: ~/artifacts }
publish:
docker: [{ image: 'circleci/openjdk:8-node' }]
docker: [{ image: 'cimg/openjdk:11.0.10-node' }]
resource_class: medium
environment:
CIRCLE_TEST_REPORTS: /home/circleci/junit
CIRCLE_ARTIFACTS: /home/circleci/artifacts
GRADLE_OPTS: -Dorg.gradle.workers.max=1 -Dorg.gradle.jvmargs='-Xmx2g --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
_JAVA_OPTIONS: -XX:ActiveProcessorCount=2 -XX:MaxRAM=4g -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/home/circleci/artifacts/hs_err_pid%p.log -XX:HeapDumpPath=/home/circleci/artifacts
steps:
- attach_workspace: { at: . }
- restore_cache: { key: 'gradle-wrapper-v2-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'gradle-cache-v2-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- attach_workspace: { at: /home/circleci }
- restore_cache: { key: 'gradle-wrapper-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}' }
- restore_cache: { key: 'publish-gradle-cache-v1-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}' }
- deploy:
command: ./gradlew --profile --parallel --stacktrace --continue publish
- deploy:
command: ./gradlew --profile --parallel --stacktrace -Pgradle.publish.key=$GRADLE_KEY -Pgradle.publish.secret=$GRADLE_SECRET publishPlugins
command: ./gradlew --parallel --stacktrace --continue publish -Porg.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_11_HOME,JAVA_15_HOME,JAVA_17_HOME,JAVA_HOME
- run:
command: git status --porcelain
when: always
- save_cache:
key: 'publish-gradle-cache-v1-{{ checksum "versions.props" }}-{{ checksum "build.gradle" }}'
paths: [ ~/.gradle/caches ]
- store_test_results: { path: ~/junit }
- store_artifacts: { path: ~/artifacts }
workflows:
version: 2
build:
jobs:
- compile:
filters: { tags: { only: /.*/ } }
- check:
requires: [ compile ]
filters: { tags: { only: /.*/ } }
- compile-jdk11:
filters: { tags: { only: /.*/ } }
- check-jdk11:
requires: [ compile-jdk11 ]
filters: { tags: { only: /.*/ } }
- trial-publish:
requires: [ compile ]
filters: { branches: { ignore: develop } }
- publish:
requires: [ check, check-jdk11 ]
requires: [ check, trial-publish ]
filters: { tags: { only: /.*/ }, branches: { only: develop } }

3
.circleci/template.sh Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
export CIRCLECI_TEMPLATE=java-library-oss
export JDK=11

View file

@ -7,3 +7,4 @@ auto-label:
tags:
roomba: [ "merge when ready" ]
automerge: [ "merge when ready" ]
autorelease: [ "autorelease" ]

View file

@ -3,12 +3,11 @@
policy:
approval:
- or:
- infrastructure-notify has been notified
- one admin has approved (PR contributors not allowed)
- two admins have approved
- changelog only and contributor approval
- fixing excavator
- excavator only touched baseline, circle, gradle files, godel files, docker-compose-rule config or versions.props
- excavator only touched baseline, circle, gradle files, godel files, generated code, go dependencies, docker-compose-rule config or versions.props
- excavator only touched config files
- bots updated package.json and lock files
disapproval:
@ -16,15 +15,6 @@ policy:
organizations: [ "palantir" ]
approval_rules:
- name: infrastructure-notify has been notified
options:
allow_contributor: false
request_review:
enabled: true
requires:
count: 1
teams: [ "palantir/infrastructure-notify" ]
- name: one admin has approved (PR contributors not allowed)
options:
allow_contributor: false
@ -60,7 +50,7 @@ approval_rules:
has_author_in:
users: [ "svc-excavator-bot" ]
- name: excavator only touched baseline, circle, gradle files, godel files, docker-compose-rule config or versions.props
- name: excavator only touched baseline, circle, gradle files, godel files, generated code, go dependencies, docker-compose-rule config or versions.props
requires:
count: 0
if:
@ -75,15 +65,24 @@ approval_rules:
- "^\\.circleci/.*$"
- "^\\.docker-compose-rule\\.yml$"
- "^.*gradle$"
- "^\\.palantir/go-version$"
- "^gradle/wrapper/.*"
- "^gradlew$"
- "^gradlew.bat$"
- "^gradle.properties$"
- "^settings.gradle$"
- "^godelw$"
- "^godel/config/godel.properties$"
- "^.*go.mod$"
- "^.*go.sum$"
- "^.*godelw$"
- "^.*godel/config/godel.properties$"
- "^.*godel/config/godel.yml$"
- "^.*vendor/.*$"
- "^versions.props$"
- "^versions.lock$"
- "^internal/generated/.*"
- "^internal/generated_src/.*"
has_valid_signatures_by_keys:
key_ids: ["C9AF124A484882E0"]
- name: excavator only touched config files
requires:
@ -95,6 +94,8 @@ approval_rules:
paths:
- "^\\..*.yml$"
- "^\\.github/.*$"
has_valid_signatures_by_keys:
key_ids: ["C9AF124A484882E0"]
- name: bots updated package.json and lock files
requires:
@ -108,3 +109,5 @@ approval_rules:
paths:
- "^.*yarn.lock$"
- "^.*package.json$"
has_valid_signatures_by_keys:
key_ids: ["C9AF124A484882E0"]

View file

@ -36,7 +36,7 @@ Configure this plugin and its wrappers around GraalVM tools through the `graal`
**`native-image` controls**
* `outputName`: the name to use for the image output
* `mainClass`: the main class entry-point for the image to run
* `option`: additional native-image options `https://github.com/oracle/graal/blob/master/substratevm/Options.md`
* `option`: additional native-image options (see https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/Options.md)
Local GraalVM Tooling Cache
---------------------------

View file

@ -13,67 +13,66 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import net.ltgt.gradle.errorprone.CheckSeverity
buildscript {
repositories {
jcenter()
gradlePluginPortal()
maven { url 'https://palantir.bintray.com/releases'}
mavenCentral() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
gradlePluginPortal() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
}
dependencies {
classpath 'com.palantir.javaformat:gradle-palantir-java-format:1.0.1'
classpath 'com.netflix.nebula:gradle-info-plugin:9.1.1'
classpath 'com.gradle.publish:plugin-publish-plugin:0.12.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'com.netflix.nebula:nebula-publishing-plugin:17.3.2'
classpath 'com.palantir.baseline:gradle-baseline-java:2.49.1'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.27.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.3'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0'
classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.5.0'
classpath 'com.palantir.gradle.jdks:gradle-jdks:0.31.0'
classpath 'com.palantir.gradle.jdkslatest:gradle-jdks-latest:0.7.0'
classpath 'com.gradle.publish:plugin-publish-plugin:1.1.0'
classpath 'com.palantir.baseline:gradle-baseline-java:4.188.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.12.0'
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.11.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:1.0.0'
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.28.0'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.7.0'
}
}
repositories {
jcenter()
gradlePluginPortal()
maven { url 'https://palantir.bintray.com/releases'}
allprojects {
apply plugin: 'com.palantir.jakarta-package-alignment'
}
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'com.palantir.baseline'
apply plugin: 'com.palantir.git-version'
apply plugin: 'com.palantir.consistent-versions'
apply plugin: 'nebula.maven-publish'
apply plugin: 'nebula.source-jar'
apply plugin: 'org.inferred.processors'
apply plugin: 'java-gradle-plugin'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'com.palantir.baseline'
apply plugin: 'com.palantir.baseline-java-versions'
apply plugin: 'com.palantir.consistent-versions'
apply plugin: 'com.palantir.external-publish-gradle-plugin'
apply plugin: 'com.palantir.external-publish-jar'
apply plugin: 'com.palantir.git-version'
apply plugin: 'com.palantir.java-format'
apply from: "${rootDir}/gradle/bintray-publish.gradle"
apply plugin: 'com.palantir.jdks.latest'
apply plugin: 'org.inferred.processors'
group 'com.palantir.graal'
version gitVersion()
dependencies {
compile localGroovy()
compile gradleApi()
repositories {
mavenCentral() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
}
testCompile gradleTestKit()
testCompile 'com.netflix.nebula:nebula-test'
testCompile 'com.squareup.okhttp3:mockwebserver'
dependencies {
implementation localGroovy()
implementation gradleApi()
testImplementation gradleTestKit()
testImplementation 'com.netflix.nebula:nebula-test'
testImplementation 'com.squareup.okhttp3:mockwebserver'
}
gradlePlugin {
// do not add new task to publish to plugins.gradle.org
automatedPublishing = false
plugins {
graal {
id = 'com.palantir.graal'
displayName = 'Palantir Graal Plugin'
implementationClass = 'com.palantir.gradle.graal.GradleGraalPlugin'
}
}
@ -84,22 +83,19 @@ pluginBundle {
vcsUrl = 'https://github.com/palantir/gradle-graal'
description = 'A plugin for Gradle that adds tasks to download, extract and interact with GraalVM tooling.'
tags = ['graal', 'native-image']
}
plugins {
graal {
id = 'com.palantir.graal'
displayName = 'Palantir Graal Plugin'
}
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Werror']
options.errorprone {
check("PreferSafeLogger", CheckSeverity.OFF)
check("PreferSafeLoggingPreconditions", CheckSeverity.OFF)
check("PreferSafeLoggableExceptions", CheckSeverity.OFF)
check("Slf4jLogsafeArgs", CheckSeverity.OFF)
}
}
publishPlugins.onlyIf {
versionDetails().isCleanTag
}
tasks.withType(JavaCompile).configureEach {
options.errorprone.errorproneArgs += [
'-Xep:PreferSafeLoggableExceptions:OFF',
'-Xep:PreferSafeLoggingPreconditions:OFF',
]
javaVersions {
libraryTarget = 11
runtime = 17
}

View file

@ -0,0 +1,5 @@
type: improvement
improvement:
description: Publish to gradle plugin portal
links:
- https://github.com/palantir/gradle-graal/pull/485

View file

@ -0,0 +1,5 @@
type: feature
feature:
description: Support Java 16 for GraalVM 21.1.0 and greater
links:
- https://github.com/palantir/gradle-graal/pull/432

View file

@ -1,2 +1,8 @@
org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
org.gradle.caching=true
org.gradle.parallel=true
com.palantir.baseline-versions.disable = true

View file

@ -1,36 +0,0 @@
/*
* (c) Copyright 2018 Palantir Technologies Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'com.jfrog.bintray'
bintray {
user = System.env.BINTRAY_USERNAME
key = System.env.BINTRAY_PASSWORD
publish = true
pkg {
repo = 'releases'
name = rootProject.name
userOrg = 'palantir'
licenses = ['Apache-2.0']
publications = ['nebula']
}
}
publish.dependsOn bintrayUpload
bintrayUpload.onlyIf {
versionDetails().isCleanTag
}

Binary file not shown.

View file

@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

286
gradlew vendored
View file

@ -1,7 +1,7 @@
#!/usr/bin/env sh
#!/bin/sh
#
# Copyright 2015 the original author or authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -17,78 +17,113 @@
#
##############################################################################
##
## Gradle start up script for UN*X
##
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
MAX_FD=maximum
warn () {
echo "$*"
}
} >&2
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
@ -105,84 +140,105 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

38
gradlew.bat vendored
View file

@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@ -25,10 +25,14 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@ -37,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -51,7 +55,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@ -61,38 +65,26 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

View file

@ -65,6 +65,7 @@ public abstract class BaseGraalCompileTask extends DefaultTask {
.map(d -> d.file(outputName.get() + getArchitectureSpecifiedOutputExtension())));
}
@Input
protected abstract String getArchitectureSpecifiedOutputExtension();
protected final File maybeCreateOutputDirectory() throws IOException {
@ -73,6 +74,7 @@ public abstract class BaseGraalCompileTask extends DefaultTask {
return directory;
}
@Input
protected final String getExecutable() {
return cacheDir.get()
.resolve(Paths.get(graalVersion.get(), javaVersion.get(), graalDirectoryName.get()))
@ -266,15 +268,8 @@ public abstract class BaseGraalCompileTask extends DefaultTask {
this.options.set(options);
}
@Input
public final ListProperty<String> getOptions() {
return options;
}
public final RegularFileProperty getJarFile() {
return jarFile;
}
public final Property<Path> getCacheDir() {
return cacheDir;
}
}

View file

@ -50,7 +50,7 @@ public class DownloadGraalTask extends DefaultTask {
setGroup(GradleGraalPlugin.TASK_GROUP);
setDescription("Downloads and caches GraalVM binaries.");
onlyIf(task -> !getArchive().get().getAsFile().exists());
onlyIf(_task -> !getArchive().get().getAsFile().exists());
}
@TaskAction
@ -104,7 +104,7 @@ public class DownloadGraalTask extends DefaultTask {
}
private String render(String pattern) {
final String computedJavaVersion = GraalVersionUtil.isGraalVersionGreatherThan19_3(graalVersion.get())
final String computedJavaVersion = GraalVersionUtil.isGraalVersionGreaterOrEqualThan(graalVersion.get(), 19, 3)
? "java" + javaVersion.get()
: ""; // for GraalVM >= 19.3 the naming contains java8 or java11
return pattern.replaceAll("\\[url\\]", downloadBaseUrl.get())

View file

@ -56,8 +56,8 @@ public class ExtractGraalTask extends DefaultTask {
setDescription("Extracts GraalVM tooling from downloaded archive using the system's tar command or Gradle's"
+ " copy method.");
onlyIf(task -> !getOutputDirectory().get().getAsFile().exists());
outputDirectory.set(cacheDir.map(cd -> getProject()
onlyIf(_task -> !getOutputDirectory().get().getAsFile().exists());
outputDirectory.set(cacheDir.map(_cd -> getProject()
.getLayout()
.getProjectDirectory()
.dir(cacheDir.get().toFile().getAbsolutePath())

View file

@ -44,7 +44,7 @@ public class GraalExtension {
private static final String DOWNLOAD_BASE_URL_GRAAL_19_3 =
"https://github.com/graalvm/graalvm-ce-builds/" + "releases/download/";
private static final String DEFAULT_GRAAL_VERSION = "20.2.0";
private static final List<String> SUPPORTED_JAVA_VERSIONS = Arrays.asList("11", "8");
private static final List<String> SUPPORTED_JAVA_VERSIONS = Arrays.asList("17", "16", "11", "8");
private static final String DEFAULT_JAVA_VERSION = "8";
private final Property<String> downloadBaseUrl;
@ -215,7 +215,7 @@ public class GraalExtension {
public final Provider<String> getGraalDirectoryName() {
return providerFactory.provider(() -> {
if (GraalVersionUtil.isGraalVersionGreatherThan19_3(graalVersion.get())) {
if (GraalVersionUtil.isGraalVersionGreaterOrEqualThan(graalVersion.get(), 19, 3)) {
return "graalvm-ce-java" + javaVersion.get() + "-" + graalVersion.get();
}
return "graalvm-ce-" + graalVersion.get();
@ -223,7 +223,15 @@ public class GraalExtension {
}
private String getDefaultDownloadBaseUrl() {
if (GraalVersionUtil.isGraalVersionGreatherThan19_3(graalVersion.get())) {
if (javaVersion.get().equals("17")
&& !GraalVersionUtil.isGraalVersionGreaterOrEqualThan(graalVersion.get(), 21, 3)) {
throw new GradleException(
"Unsupported GraalVM version " + graalVersion.get() + " for Java 17, needs >= 21.3.0.");
} else if (javaVersion.get().equals("16")
&& !GraalVersionUtil.isGraalVersionGreaterOrEqualThan(graalVersion.get(), 21, 1)) {
throw new GradleException(
"Unsupported GraalVM version " + graalVersion.get() + " for Java 16, needs >= 21.1.0.");
} else if (GraalVersionUtil.isGraalVersionGreaterOrEqualThan(graalVersion.get(), 19, 3)) {
return DOWNLOAD_BASE_URL_GRAAL_19_3;
} else if (!javaVersion.get().equals("8")) {
throw new GradleException("Unsupported Java version for GraalVM version.");

View file

@ -17,12 +17,12 @@
package com.palantir.gradle.graal;
public final class GraalVersionUtil {
public static boolean isGraalVersionGreatherThan19_3(String graalVersion) {
public static boolean isGraalVersionGreaterOrEqualThan(String graalVersion, int majorVersion, int minorVersion) {
try {
final String[] versionSplit = graalVersion.split("\\.", -1);
final int majorVersion = Integer.valueOf(versionSplit[0]);
final int minorVersion = Integer.valueOf(versionSplit[1]);
return majorVersion > 19 || (majorVersion == 19 && minorVersion >= 3);
final int majorVersion0 = Integer.valueOf(versionSplit[0]);
final int minorVersion0 = Integer.valueOf(versionSplit[1]);
return majorVersion0 > majorVersion || (majorVersion0 == majorVersion && minorVersion0 >= minorVersion);
} catch (NumberFormatException ignored) {
return false;
}

View file

@ -1 +0,0 @@
implementation-class=com.palantir.gradle.graal.GradleGraalPlugin

View file

@ -86,6 +86,46 @@ class GradleExtensionSpec extends ProjectSpec {
extension.getGraalDirectoryName().get() =~ "graalvm-ce-java11-19.3.0"
}
def 'extension should throw exception for graalVersion 21.0.0 and Java version 16'() {
when:
extension.javaVersion("16")
extension.graalVersion("21.0.0")
extension.getDownloadBaseUrl().get()
then:
thrown GradleException
}
def 'extension returns the correct Graal download URL and directory name for Java version 16 and graalVersion 21.1.0'() {
when:
extension.javaVersion("16")
extension.graalVersion("21.1.0")
then:
extension.getDownloadBaseUrl().get() =~ "https://github.com/graalvm/graalvm-ce-builds/releases/download/"
extension.getGraalDirectoryName().get() =~ "graalvm-ce-java16-21.1.0"
}
def 'extension should throw exception for graalVersion 21.1.0 and Java version 17'() {
when:
extension.javaVersion("17")
extension.graalVersion("21.1.0")
extension.getDownloadBaseUrl().get()
then:
thrown GradleException
}
def 'extension returns the correct Graal download URL and directory name for Java version 17 and graalVersion 21.3.0'() {
when:
extension.javaVersion("17")
extension.graalVersion("21.3.0")
then:
extension.getDownloadBaseUrl().get() =~ "https://github.com/graalvm/graalvm-ce-builds/releases/download/"
extension.getGraalDirectoryName().get() =~ "graalvm-ce-java17-21.3.0"
}
def 'extension should throw exception for unsupported Java version'() {
when:
extension.javaVersion("12")

View file

@ -23,16 +23,26 @@ import spock.lang.Specification
class GradleVersionUtilSpec extends Specification {
def 'should detect Graal version 19.2.0 is not 19.3+'() {
expect:
!GraalVersionUtil.isGraalVersionGreatherThan19_3("19.2.0")
!GraalVersionUtil.isGraalVersionGreaterOrEqualThan("19.2.0", 19, 3)
}
def 'should detect Graal version 19.3.0 is not 19.3+'() {
def 'should detect Graal version 19.3.0 is 19.3+'() {
expect:
GraalVersionUtil.isGraalVersionGreatherThan19_3("19.3.0")
GraalVersionUtil.isGraalVersionGreaterOrEqualThan("19.3.0", 19, 3)
}
def 'should detect Graal version empty is not 19.3+'() {
expect:
!GraalVersionUtil.isGraalVersionGreatherThan19_3("")
!GraalVersionUtil.isGraalVersionGreaterOrEqualThan("", 19, 3)
}
def 'should detect Graal version 21.1.0 is 21.1+'() {
expect:
GraalVersionUtil.isGraalVersionGreaterOrEqualThan("21.1.0", 21, 1)
}
def 'should detect Graal version 21.0.0 is not 21.1+'() {
expect:
!GraalVersionUtil.isGraalVersionGreaterOrEqualThan("21.0.0", 21, 1)
}
}

View file

@ -2,20 +2,18 @@
[Test dependencies]
cglib:cglib-nodep:3.2.2 (1 constraints: 490ded24)
com.google.code.findbugs:jsr305:3.0.2 (2 constraints: 1d0fb186)
com.google.errorprone:error_prone_annotations:2.4.0 (2 constraints: 1d0fd486)
com.google.guava:failureaccess:1.0.1 (1 constraints: 140ae1b4)
com.google.guava:guava:27.0.1-jre (2 constraints: c7135868)
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (1 constraints: bd17c918)
com.google.j2objc:j2objc-annotations:1.1 (1 constraints: b609eba0)
com.netflix.nebula:nebula-test:7.8.6 (1 constraints: 17052c36)
com.netflix.nebula:nebula-test:10.2.0 (1 constraints: 35052d3b)
com.squareup.okhttp3:mockwebserver:3.14.1 (1 constraints: 3b05423b)
com.squareup.okhttp3:okhttp:3.14.1 (1 constraints: 680fa37c)
com.squareup.okio:okio:1.17.2 (1 constraints: 850cc309)
commons-io:commons-io:2.5 (1 constraints: eb0c8d0a)
junit:junit:4.12 (2 constraints: 0c1c0d9c)
org.checkerframework:checker-qual:2.5.3 (2 constraints: 260f6187)
org.codehaus.mojo:animal-sniffer-annotations:1.17 (1 constraints: ed09d8aa)
junit:junit:4.13.2 (2 constraints: 221d6f12)
org.apiguardian:apiguardian-api:1.1.2 (2 constraints: 5523ed36)
org.codehaus.groovy:groovy:3.0.9 (2 constraints: 241bc56d)
org.hamcrest:hamcrest:2.2 (1 constraints: d20cdc04)
org.hamcrest:hamcrest-core:1.3 (1 constraints: cc05fe3f)
org.junit.platform:junit-platform-commons:1.8.1 (1 constraints: 6e119ed9)
org.junit.platform:junit-platform-engine:1.8.1 (1 constraints: 360d1a1f)
org.objenesis:objenesis:2.4 (1 constraints: ea0c8c0a)
org.spockframework:spock-core:1.3-groovy-2.4 (1 constraints: 7c10f3af)
org.opentest4j:opentest4j:1.2.0 (1 constraints: 67118bd9)
org.spockframework:spock-core:2.1-M2-groovy-3.0 (2 constraints: e622905a)
org.spockframework:spock-junit4:2.1-M2-groovy-3.0 (1 constraints: 241154df)

View file

@ -1,8 +1,4 @@
com.google.guava:guava = 27.0.1-jre
com.netflix.nebula:nebula-test = 7.8.6
com.fasterxml.jackson.core:jackson-databind = 2.13.2.1
com.google.guava:guava = 31.1-jre
com.netflix.nebula:nebula-test = 10.2.0
com.squareup.okhttp3:* = 3.14.1
# conflict resolution
com.google.code.findbugs:jsr305 = 3.0.2
com.google.errorprone:error_prone_annotations = 2.4.0
org.checkerframework:checker-qual = 2.5.3