FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Embed Java license in generator code · codeplaysoftware/tensorflow@3c799b4 · GitHub

Repository navigation

Commit 3c799b4

Browse files
committed
Embed Java license in generator code
1 parent 90bbbdc commit 3c799b4

2 files changed

Lines changed: 16 additions & 17 deletions

File tree

‎tensorflow/java/src/gen/cc/op_generator.cc‎

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,21 @@ namespace tensorflow {
3535
namespace java {
3636
namespace {
3737

38-
const char* kLicenseSnippet =
39-
"tensorflow/java/src/gen/resources/license.java.snippet";
38+
const char* kLicense =
39+
"/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n"
40+
"\n"
41+
"Licensed under the Apache License, Version 2.0 (the \"License\");\n"
42+
"you may not use this file except in compliance with the License.\n"
43+
"You may obtain a copy of the License at\n"
44+
"\n"
45+
" http://www.apache.org/licenses/LICENSE-2.0\n"
46+
"\n"
47+
"Unless required by applicable law or agreed to in writing, software\n"
48+
"distributed under the License is distributed on an \"AS IS\" BASIS,\n"
49+
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
50+
"See the License for the specific language governing permissions and\n"
51+
"limitations under the License.\n"
52+
"=======================================================================*/\n";
4053

4154
// There is three different modes to render an op class, depending on the
4255
// number and type of outputs it has:
@@ -401,7 +414,7 @@ void GenerateOp(const OpSpec& op, const EndpointSpec& endpoint,
401414
SourceFileWriter writer(op_file.get());
402415
std::list<Type> dependencies;
403416
CollectOpDependencies(op, mode, &dependencies);
404-
writer.WriteFromFile(kLicenseSnippet)
417+
writer.Write(kLicense)
405418
.EndLine()
406419
.BeginType(op_class, PUBLIC|FINAL, &dependencies, &op_javadoc);
407420
if (!op.optional_attributes().empty()) {

‎tensorflow/java/src/gen/resources/license.java.snippet‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL