Gradle Metal is a suite of Gradle plugins for bare metal development, primarily design to support project Metal.
Features:
-
compile assembler, c and c sources (with support for c modules)
-
assemble applications and (static) libraries
-
cross-compilation support
-
compilation commands database support
-
source dependency on included project or build
-
binary dependency on prebuilt external project
-
LLVM tools
Warning
|
This project is under early development. Compatibility will be broken without prior notice. In particular, we will not stabilize our Gradle dependency before Gradle 9. |
A C++ library project with modules support is defined as simply as:
plugins {
id("br.dev.pedrolamarao.metal.library")
id("br.dev.pedrolamarao.metal.cxx")
}
library {
compileOptions = listOf("-std=c++20")
}
Check the samples for a variety of use-cases.
Current requirements:
-
Gradle 8.10 or newer
-
JDK 17 or newer
-
LLVM 16 or newer (with
clang
,clang-scan-deps
,lld
,llvm-ar
etc.)
To use the development version, you may install from source with ./gradlew publishToMavenLocal
and configure your project’s settings like this:
pluginManagement {
repositories {
mavenLocal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id.startsWith("br.dev.pedrolamarao.metal.")) {
useModule("br.dev.pedrolamarao.gradle.metal:plugins:0.6+")
}
}
}
}
Under construction:
-
Gradle configuration cache support
-
build flavour (e.g.
debug
,release
) -
shared library
-
source dependencies on cmake project
-
binary dependencies from maven repository
-
GCC tools
-
MSVC tools
For development status, see Github issues at https://github.com/pedrolamarao/gradle-metal/issues.