-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Advance to version 0.2 * Remove explicit root project name. * Add a prerelease identifier. * Set linker to clang++. * Update link. * Discover target host (#42) * Update to Gradle 8.4 final * Advance version to 0.3 * Improve external cmake project sample. * Discover host target. Closes #34. * Test host target discovery. * Conventional archive adds a test application (#43) * Update to Gradle 8.4 final * Advance version to 0.3 * Improve external cmake project sample. * Discover host target. Closes #34. * Test host target discovery. * Conventional archive adds a test application. * When configuring ixx includes, configure also commands task (#44) * Update to Gradle 8.4 final * Advance version to 0.3 * Improve external cmake project sample. * Discover host target. Closes #34. * Test host target discovery. * Conventional archive adds a test application. * When configuring ixx includes, configure also the commands task. * Test compile option inheritance. * Expose locateTool (#47) * Update CI; add LLVM 17. (#48) * Get path from providers. * Add a run task for conventional application components. * Wire the main module to the test module. * Don't apply cpp plugin * Require JDK 17 * Shorten notation of test files. * API for conventional archive and executable file names (#50) * Don't apply cpp plugin * Require JDK 17 * Shorten notation of test files. * API for conventional archive and executable file names. Closes #33. * API to define includables etc. as public or private. (#51) * API to define includables etc. as public or private. Closes #46. * API to define includables etc. as public or private. Closes #46. * Add MetalService::getHost and MetalService::getTarget. * Remove getLinkables, use SourceTask::source. * Wire run-test to test to check. * API for set of enabled targets (#53) Provide API for restricting the set of targets where the source set or component is enabled. The empty set has the special meaning of permitting everything. * Avoid linking empty source set. (#55) Closes #52. * Add javadoc. * Update to 0.3-next * Update samples. * Ignore sample external src. * Locate tools with metal extension. * Update version string. * Fix runTask onlyIf targets is empty i.e. default. * Add onlyIf reason. * Advance version to 0.3-rc-1 * Fix typo. * Document published plugins. * Set version to 0.3.
- Loading branch information
1 parent
008ac7e
commit f20fc7a
Showing
94 changed files
with
2,038 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
.../src/functionalTest/java/br/dev/pedrolamarao/gradle/metal/MultiProjectFunctionalTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
package br.dev.pedrolamarao.gradle.metal; | ||
|
||
import org.gradle.testkit.runner.GradleRunner; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.io.TempDir; | ||
|
||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
|
||
public class MultiProjectFunctionalTest | ||
{ | ||
@TempDir | ||
Path projectDir; | ||
|
||
/** | ||
* There are two archive projects, foo and bar, with main C++ sources. | ||
* Both foo and bar test source set is empty. | ||
* Bar depends on foo. | ||
* Running <code>check</code> must not try to run nonexistent test applications. | ||
* @see <a href="https://github.com/pedrolamarao/gradle-metal/issues/52">https://github.com/pedrolamarao/gradle-metal/issues/52</a> | ||
*/ | ||
@Test | ||
void issue52 () throws Exception | ||
{ | ||
final var fooDir = projectDir.resolve("foo"); | ||
Files.createDirectories(fooDir); | ||
Files.writeString(fooDir.resolve("build.gradle.kts"), | ||
""" | ||
plugins { | ||
id("br.dev.pedrolamarao.metal.archive") | ||
id("br.dev.pedrolamarao.metal.cpp") | ||
id("br.dev.pedrolamarao.metal.cxx") | ||
} | ||
metal { | ||
cpp { | ||
main { | ||
public = true | ||
} | ||
} | ||
} | ||
"""); | ||
|
||
final var barDir = projectDir.resolve("bar"); | ||
Files.createDirectories(barDir); | ||
Files.writeString(barDir.resolve("build.gradle.kts"), | ||
""" | ||
plugins { | ||
id("br.dev.pedrolamarao.metal.archive") | ||
id("br.dev.pedrolamarao.metal.cxx") | ||
} | ||
dependencies { | ||
implementation(project(":foo")) | ||
} | ||
"""); | ||
|
||
final var fooCppDir = fooDir.resolve("src/main/cpp"); | ||
Files.createDirectories(fooCppDir); | ||
Files.writeString(fooCppDir.resolve("foo.h"), | ||
""" | ||
#pragma once | ||
int foo (int argc, char * argv[]); | ||
"""); | ||
|
||
final var fooCxxDir = fooDir.resolve("src/main/cxx"); | ||
Files.createDirectories(fooCxxDir); | ||
Files.writeString(fooCxxDir.resolve("foo.cxx"), | ||
""" | ||
#include <foo.h> | ||
int foo (int argc, char * argv[]) | ||
{ | ||
return 0; | ||
} | ||
"""); | ||
|
||
final var barCxxDir = projectDir.resolve("bar/main/cxx"); | ||
Files.createDirectories(barCxxDir); | ||
Files.writeString(barCxxDir.resolve("bar.cxx"), | ||
""" | ||
#include <foo.h> | ||
int bar (int argc, char * argv[]) | ||
{ | ||
return foo(argc,argv); | ||
} | ||
"""); | ||
|
||
Files.writeString(projectDir.resolve("build.gradle.kts"), | ||
""" | ||
plugins { | ||
id("base") | ||
} | ||
"""); | ||
|
||
Files.writeString(projectDir.resolve("settings.gradle.kts"), | ||
""" | ||
include("bar") | ||
include("foo") | ||
"""); | ||
|
||
GradleRunner.create() | ||
.withPluginClasspath() | ||
.withProjectDir(projectDir.toFile()) | ||
.withArguments("check") | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.