Skip to content

Commit 0add0af

Browse files
authored
Merge pull request #26 from Addepar/scott/junit5-support
[buck] enable junit5
2 parents 79f00e3 + d9d02dc commit 0add0af

34 files changed

+1277
-254
lines changed

.idea/libraries/apiguardian_api.xml

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

.idea/libraries/junit5_jupiter_api.xml

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

.idea/libraries/junit5_platform_commons.xml

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

.idea/libraries/junit5_platform_engine.xml

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

.idea/libraries/junit5_platform_launcher.xml

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

.idea/misc.xml

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

.idea/vcs.xml

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

README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,41 @@ Buck tries to move fast with respect to its internals. However, for user facing
4747
- For larger features, a change eventually is put in place that sets the default to the new behavior. e.g. when Skylark becomes the default build file parser.
4848
- When the removal date is reached, a change is submitted to remove the feature. At this point, the configuration value will still parse, but will not be used by Buck internally.
4949

50-
Updating the Buck executable in AMP
50+
Developing with the Buck executable in AMP
5151
-----------------------------------
5252

53-
To update `buck.pex` from AMP, run the following in this repo:
53+
To build and use a developmental `buck.pex` in AMP temporarily, run the following in this repo:
5454

5555
ant
5656
./bin/buck build --config java.target_level=11 --config java.source_level=11 --config python.interpreter=python2 --config python.pex_flags='' buck --show-output
5757
cp ./buck-out/gen/<hash>/programs/buck.pex <location-of-AMP-directory>
58+
touch <location-of-AMP-directory>/.ignore-buck-version
5859

59-
Note: `<hash>` is an 8 letter SHA prefix that will depend on which buck commit you're on.
60+
Note: `<hash>` is an 8 letter SHA prefix that will depend on which buck commit you're on. `.ignore-buck-version` is important since without that file, AMP will try to download the version of buck specified in `.buckversion_` instead of using the one you just copied into AMP.
61+
62+
If ant fails with compilation errors on the latest release, try running
63+
64+
ant clean all
65+
66+
Releasing a new version of Buck in AMP
67+
-----------------------------------
68+
69+
Once you're satisfied with a new version of Buck, you can release it to AMP by following these steps:
70+
71+
##### 1. Merge the new release into github.
72+
73+
Raise a PR against the branch `v2022.05.05.01` in https://github.com/Addepar/buck. Get it approved and merged.
74+
75+
##### 2. Create a new release
76+
77+
Go to https://github.com/Addepar/buck/releases and draft a new release, incrementing the version by 1, e.g. v7 to v8.
78+
Make sure to compute the buck.pex SHA1 hash by running `shasum buck.pex` in this repo and make a note of this hash in the release notes.
79+
Also include a link to the PR created in step 1 above.
80+
81+
##### 2. Update the version and buck SHA1 hash in AMP
82+
83+
Raise a PR in AMP updating the buck version and SHA1 hash in `buck.sh` in the AMP repo.
84+
See [this PR](https://github.com/Addepar/AMP/pull/68478/files#diff-dcd8a834dc1ea51b6d597c2247ada269b6e35bdd254a2907925d703d506f1872) for an example.
6085

6186
License
6287
-------

buck.iml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
<excludeFolder url="file://$MODULE_DIR$/test/com/facebook/buck/util/zip/collect/testdata" />
101101
<excludeFolder url="file://$MODULE_DIR$/test/com/facebook/buck/zip/testdata" />
102102
</content>
103-
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
103+
<orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" />
104104
<orderEntry type="sourceFolder" forTests="false" />
105105
<orderEntry type="library" name="asm" level="project" />
106106
<orderEntry type="library" name="buck-lib" level="project" />
@@ -159,5 +159,13 @@
159159
<orderEntry type="library" name="kotlinx-metadata" level="project" />
160160
<orderEntry type="library" name="jackson-module-kotlin-2.9.9" level="project" />
161161
<orderEntry type="library" name="log4j2" level="project" />
162+
<orderEntry type="library" name="junit5-jupiter-api" level="project" />
163+
<orderEntry type="library" name="junit5-platform-engine" level="project" />
164+
<orderEntry type="library" name="junit5-platform-launcher" level="project" />
165+
<orderEntry type="library" name="junit5-jupiter-api" level="project" />
166+
<orderEntry type="library" name="junit5-platform-engine" level="project" />
167+
<orderEntry type="library" name="junit5-platform-launcher" level="project" />
168+
<orderEntry type="library" name="junit5-platform-commons" level="project" />
169+
<orderEntry type="library" name="apiguardian-api" level="project" />
162170
</component>
163171
</module>

build.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,17 @@
363363

364364
<fileset dir="${third-party.dir}/java" id="testrunner.jars">
365365
<include name="android/ddmlib-25.3.0.jar" />
366+
<include name="apiguardian-api/apiguardian-api-1.1.2.jar" />
366367
<include name="guava/guava-20.0.jar" />
367368
<include name="guava/guava-23.3-jre.jar" />
368369
<include name="guice/guice-3.0.jar" />
369370
<include name="jsr/javax.inject-1.jar" />
370371
<include name="jsr/jsr305.jar" />
371372
<include name="junit/junit-4.12.jar" />
373+
<include name="junit5-jupiter-api/junit-jupiter-api-5.10.1.jar" />
374+
<include name="junit5-platform-commons/junit-platform-commons-1.10.1.jar" />
375+
<include name="junit5-platform-engine/junit-platform-engine-1.10.1.jar" />
376+
<include name="junit5-platform-launcher/junit-platform-launcher-1.10.1.jar" />
372377
<include name="testng/testng-6.8.jar" />
373378
</fileset>
374379

@@ -1244,7 +1249,12 @@
12441249
<path id="javadoc.classpath">
12451250
<path refid="classpath" />
12461251
<!-- Buck test runner has references to JUnit and TestNG. -->
1252+
<pathelement location="${third-party.dir}/java/apiguardian-api/apiguardian-api-1.1.2.jar" />
12471253
<pathelement location="${third-party.dir}/java/junit/junit-4.12.jar" />
1254+
<pathelement location="${third-party.dir}/java/junit5-jupiter-api/junit-jupiter-api-5.10.1.jar" />
1255+
<pathelement location="${third-party.dir}/java/junit5-platform-commons/junit-platform-commons-1.10.1.jar" />
1256+
<pathelement location="${third-party.dir}/java/junit5-platform-engine/junit-platform-engine-1.10.1.jar" />
1257+
<pathelement location="${third-party.dir}/java/junit5-platform-launcher/junit-platform-launcher-1.10.1.jar" />
12481258
<pathelement location="${third-party.dir}/java/testng/testng-6.8.jar" />
12491259

12501260
<!-- Include the Compiler Tree API stub because its types are used in some places. -->

0 commit comments

Comments
 (0)