You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2017/11/17 22:30:14 UTC
[43/50] [abbrv] beam git commit: Add Java SDK Container Gradle build
file
Add Java SDK Container Gradle build file
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/c03d0c6e
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/c03d0c6e
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/c03d0c6e
Branch: refs/heads/master
Commit: c03d0c6e4ad2945ce5c543519304e7efb090f5c5
Parents: 9c9d39b
Author: Luke Cwik <lc...@google.com>
Authored: Mon Nov 6 12:30:00 2017 -0800
Committer: Luke Cwik <lc...@google.com>
Committed: Fri Nov 17 14:27:16 2017 -0800
----------------------------------------------------------------------
sdks/java/container/build.gradle | 51 +++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam/blob/c03d0c6e/sdks/java/container/build.gradle
----------------------------------------------------------------------
diff --git a/sdks/java/container/build.gradle b/sdks/java/container/build.gradle
new file mode 100644
index 0000000..8933c93
--- /dev/null
+++ b/sdks/java/container/build.gradle
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply from: project(":").file("build_rules.gradle")
+applyGoNature()
+applyDockerNature()
+
+description = "Apache Beam :: SDKs :: Java :: Container"
+
+// Figure out why the golang plugin does not add a build dependency between projects.
+// Without the line below, we get spurious errors about not being able to resolve
+// "./github.com/apache/beam/sdks/go"
+resolveBuildDependencies.dependsOn ":beam-sdks-parent:beam-sdks-go:build"
+
+dependencies {
+ golang {
+ // TODO(herohde): use "./" prefix to prevent gogradle use base github path, for now.
+ // TODO(herohde): get the pkg subdirectory only, if possible. We spend mins pulling cmd/beamctl deps.
+ build name: './github.com/apache/beam/sdks/go', dir: project(':beam-sdks-parent:beam-sdks-go').projectDir
+ }
+}
+
+golang {
+ packagePath = 'github.com/apache/beam/sdks/python/boot'
+ build {
+ // TODO(herohde): build local platform + linux-amd64, if possible.
+ targetPlatform = ['linux-amd64']
+ outputLocation = './build/target/${GOOS}_${GOARCH}/boot'
+ }
+}
+
+docker {
+ // TODO(herohde): make the name easier to generate for releases.
+ name System.properties['user.name'] + '-docker-apache.bintray.io/beam/java:latest'
+ files "./build/"
+}