Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #90: Make the 'find java' task recognize Homebrew installed jdk on macOS #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Antlr4BuildTasks/Antlr4BuildTasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<EnableDefaultNoneItems>False</EnableDefaultNoneItems>
<RootNamespace>Antlr4.Build.Tasks</RootNamespace>
<AssemblyName>Antlr4BuildTasks</AssemblyName>
<AssemblyVersion>12.8</AssemblyVersion>
<FileVersion>12.8</FileVersion>
<Version>12.8</Version>
<AssemblyVersion>12.9</AssemblyVersion>
<FileVersion>12.9</FileVersion>
<Version>12.9</Version>
<Description>Derivative of Harwell's Antrl4cs: contains "ITask" wrapper for Msbuild, schemas for setting Antlr4 file properties, and a separately installed official Antlr4 java tool at antlr.org downloads.</Description>
<Copyright />
<Company>Domemtech</Company>
Expand All @@ -23,8 +23,9 @@
<PackageTags>antlr antlr4 parsing</PackageTags>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>Ken Domino</Authors>
<PackageReleaseNotes>12.8</PackageReleaseNotes>
<PackageReleaseNotes>12.9</PackageReleaseNotes>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Nullable>disable</Nullable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
Expand Down
2 changes: 1 addition & 1 deletion Antlr4BuildTasks/Tasks/RunAntlrTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ private void TestDataReceived(string data)
}
try
{
Regex valid_version_pattern = new Regex("(OpenJDK Runtime Environment [^()]*[(]build (1[1-9]|[2-9][0-9]))|(Java[(]TM[)] SE Runtime Environment [(]build (1[1-9]|[2-9][0-9]))");
Regex valid_version_pattern = new Regex("(OpenJDK Runtime Environment (?:HomeBrew )?[^()]*[(]build (1[1-9]|[2-9][0-9]))|(Java[(]TM[)] SE Runtime Environment [(]build (1[1-9]|[2-9][0-9]))");
var matches = valid_version_pattern.Matches(data);
var found = matches.Count > 0;
MessageQueue.EnqueueMessage(Message.BuildDefaultMessage("got matches " + matches.Count + " for '" + data + "'"));
Expand Down
9 changes: 6 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ to your project. csproj file as shown below, otherwise you can use the "NuGet Pa
````xml
<ItemGroup>
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.13.1" />
<PackageReference Include="Antlr4BuildTasks" Version="12.8" PrivateAssets="all" IncludeAssets="build" />
<PackageReference Include="Antlr4BuildTasks" Version="12.9" PrivateAssets="all" IncludeAssets="build" />
</ItemGroup>
````

Expand Down Expand Up @@ -167,7 +167,7 @@ to

````xml
<ItemGroup>
<PackageReference Include="Antlr4BuildTasks" Version="12.8" PrivateAssets="all" />
<PackageReference Include="Antlr4BuildTasks" Version="12.9" PrivateAssets="all" />
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.13.2" />
</ItemGroup>
````
Expand All @@ -187,7 +187,10 @@ the .csproj file as outlined above.
If you are looking for a set of templates to create a console application that uses Antlr4,
then see [Antlr4Templates](https://github.com/kaby76/Antlr4Templates).

### Latest release, v12.8
### Latest release, v12.9

### Release 12.9 (Nov '24)
* Fix for #90.

### Release 12.8 (16 Jan '24)
* Fix for #77.
Expand Down
2 changes: 1 addition & 1 deletion _tests/multi-no-java/multitarget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.11.1" />
<PackageReference Include="Antlr4BuildTasks" Version="12.8" />
<PackageReference Include="Antlr4BuildTasks" Version="12.9" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion _tests/multi-no-java/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
where=`dirname -- "$0"`
echo $where
cd $where
Expand Down
2 changes: 1 addition & 1 deletion _tests/multi/multitarget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.13.1" />
<PackageReference Include="Antlr4BuildTasks" Version="12.8" />
<PackageReference Include="Antlr4BuildTasks" Version="12.9" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion _tests/multi/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
where=`dirname -- "$0"`
echo $where
cd $where
Expand Down
2 changes: 1 addition & 1 deletion _tests/noref/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</Antlr4>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Antlr4BuildTasks" Version="12.8" />
<PackageReference Include="Antlr4BuildTasks" Version="12.9" />
</ItemGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
Expand Down
2 changes: 1 addition & 1 deletion _tests/single-no-java/single.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.13.1" />
<PackageReference Include="Antlr4BuildTasks" Version="12.8" />
<PackageReference Include="Antlr4BuildTasks" Version="12.9" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion _tests/single-no-java/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
where=`dirname -- "$0"`
echo $where
cd $where
Expand Down
2 changes: 1 addition & 1 deletion _tests/single/res.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
where=`dirname -- "$0"`
echo $where
cd $where
Expand Down
2 changes: 1 addition & 1 deletion _tests/single/single.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.13.1" />
<PackageReference Include="Antlr4BuildTasks" Version="12.8" />
<PackageReference Include="Antlr4BuildTasks" Version="12.9" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion _tests/single/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
where=`dirname -- "$0"`
echo $where
cd $where
Expand Down
2 changes: 1 addition & 1 deletion build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set +x
unameOut="$(uname -s)"
case "${unameOut}" in
Expand Down
Empty file modified bump.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion clean.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
rm -rf obj bin
rm -rf _tests/*/bin _tests/*/obj
rm -rf .vs
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ test-java:
test-no-java:
bash test-no-java.sh
publish:
dotnet nuget push Antlr4BuildTasks/bin/Release/Antlr4BuildTasks.12.8.0.nupkg --api-key ${trashkey} --source https://api.nuget.org/v3/index.json
dotnet nuget push Antlr4BuildTasks/bin/Release/Antlr4BuildTasks.12.9.0.nupkg --api-key ${trashkey} --source https://api.nuget.org/v3/index.json
2 changes: 1 addition & 1 deletion test-java.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
bash _tests/single/test.sh
bash _tests/multi/test.sh
bash _tests/noref/test.sh
2 changes: 1 addition & 1 deletion test-no-java.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/bash
#!/usr/bin/env bash
bash _tests/single-no-java/test.sh