Created
September 21, 2019 10:46
-
-
Save stepango/05c8ba3007f4e2dbc82b6b0809d529a1 to your computer and use it in GitHub Desktop.
Call Bazel from Gradle
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
apply plugin: 'java' | |
buildDir = "gradleBuild" | |
def buildBazel = tasks.register("buildBazel", Exec) { | |
finalizedBy(tasks.named("compileJava")) | |
workingDir '../' | |
commandLine 'bazel', 'build', '//' + project.name + ":bali" | |
} | |
tasks.register("bazelJar", Jar) { | |
dependsOn(buildBazel) | |
archiveFile file("../bazel-bin/bazel_wrapepr/libbali.jar") | |
} | |
artifacts.add("default", bazelJar) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment