Skip to content

Commit

Permalink
build: fix the task buildPlugin that not compatible with build config…
Browse files Browse the repository at this point in the history
…uration cache.
  • Loading branch information
xiaodongw committed Apr 29, 2023
1 parent 59301ea commit d3f59fa
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions buildSrc/src/main/kotlin/build/Plugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.google.protobuf.gradle.*
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.SourceSetContainer
import org.gradle.plugins.signing.SigningExtension
import org.gradle.kotlin.dsl.*
Expand Down Expand Up @@ -49,14 +50,10 @@ fun Project.configureGrpcPlugin(pluginName: String) {
val pluginPath = "$buildDir/exe/$pluginName${exeSuffix}"
val artifactStagingPath: File = file("$buildDir/artifacts")

tasks.register("buildPlugin") {
doLast {
exec {
workingDir = file("src/main/go")
environment = environment + mapOf("GOOS" to goOs(os), "GOARCH" to goArch(arch))
commandLine = listOf("go", "build", "-o", pluginPath, "main.go")
}
}
tasks.register("buildPlugin", Exec::class) {
workingDir = file("src/main/go")
environment = environment + mapOf("GOOS" to goOs(os), "GOARCH" to goArch(arch))
commandLine = listOf("go", "build", "-o", pluginPath, "main.go")
}

tasks.register("buildArtifacts", Copy::class) {
Expand Down

0 comments on commit d3f59fa

Please sign in to comment.