Skip to content

Commit

Permalink
Update IKVM version.
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Oct 31, 2024
1 parent 48e4915 commit cc5c6cd
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"IKVM.NET.Sdk": "8.10.1"
"IKVM.NET.Sdk": "8.10.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public void ShouldNotRemoveDuplicateDependencies()
i2.GetMetadata(MavenReferenceItemMetadata.ArtifactId).Should().Be("foo");
i2.GetMetadata(MavenReferenceItemMetadata.Version).Should().Be("1.0");
i2.GetMetadata(MavenReferenceItemMetadata.Classifier).Should().Be("cls");

}

}
Expand Down
32 changes: 32 additions & 0 deletions src/IKVM.Maven.Sdk.Tasks.Tests/MavenReferenceItemResolveTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,38 @@ public void CanResolveCircularDependency()
pkg2.GetMetadata("References").Split(';').Should().NotContain("maven$org.apache.commons:commons-text:1.11.0");
}

[TestMethod]
public void CanResolveCircularDependency2()
{
var cacheFile = Path.GetTempFileName();

var engine = new Mock<IBuildEngine>();
var errors = new List<BuildErrorEventArgs>();
engine.Setup(x => x.LogErrorEvent(It.IsAny<BuildErrorEventArgs>())).Callback((BuildErrorEventArgs e) => { errors.Add(e); TestContext.WriteLine("ERROR: " + e.Message); });
engine.Setup(x => x.LogWarningEvent(It.IsAny<BuildWarningEventArgs>())).Callback((BuildWarningEventArgs e) => TestContext.WriteLine("WARNING: " + e.Message));
engine.Setup(x => x.LogMessageEvent(It.IsAny<BuildMessageEventArgs>())).Callback((BuildMessageEventArgs e) => TestContext.WriteLine(e.Message));
var t = new MavenReferenceItemResolve();
t.BuildEngine = engine.Object;
t.CacheFile = cacheFile;
t.Repositories = new[] { GetCentralRepositoryItem() };

var i1 = new TaskItem("org.openrewrite:rewrite-java-8:8.35.0");
i1.SetMetadata(MavenReferenceItemMetadata.GroupId, "org.openrewrite");
i1.SetMetadata(MavenReferenceItemMetadata.ArtifactId, "rewrite-java-8");
i1.SetMetadata(MavenReferenceItemMetadata.Version, "8.35.0");
i1.SetMetadata(MavenReferenceItemMetadata.Scope, "compile");
t.References = new[] { i1 };

t.Execute().Should().BeTrue();
errors.Should().BeEmpty();
var pkg1 = t.ResolvedReferences.First(i => i.ItemSpec == "maven$org.apache.commons:commons-text:1.11.0");
pkg1.GetMetadata("References").Split(';').Should().Contain("maven$org.apache.commons:commons-lang3:3.13.0");
var pkg2 = t.ResolvedReferences.First(i => i.ItemSpec == "maven$org.apache.commons:commons-lang3:3.13.0");

// we break the circle so we can actually build them
pkg2.GetMetadata("References").Split(';').Should().NotContain("maven$org.apache.commons:commons-text:1.11.0");
}

[TestMethod]
public void CanResolveFromLocalRepository()
{
Expand Down
2 changes: 1 addition & 1 deletion src/IKVM.Maven.Sdk.Tasks/IKVM.Maven.Sdk.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="IKVM" Version="8.10.1" />
<PackageReference Include="IKVM" Version="8.10.3" />
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageReference Include="Microsoft.Build" Version="16.9.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.9.0" PrivateAssets="All" />
Expand Down
2 changes: 1 addition & 1 deletion src/IKVM.Maven.Sdk/IKVM.Maven.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="IKVM" Version="8.10.1" />
<PackageReference Include="IKVM" Version="8.10.3" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit cc5c6cd

Please sign in to comment.