forked from googleapis/sdk-platform-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f6f40e
commit 8983e23
Showing
63 changed files
with
7,458 additions
and
123 deletions.
There are no files selected for viewing
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
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
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
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
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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
apply plugin: 'java' | ||
|
||
description = 'GAPIC library for {{name}}' | ||
group = 'com.google.cloud' | ||
version = (findProperty('version') == 'unspecified') ? '0.0.0-SNAPSHOT' : version | ||
sourceCompatibility = 1.7 | ||
targetCompatibility = 1.7 | ||
|
||
repositories { | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
compileJava.options.encoding = 'UTF-8' | ||
javadoc.options.encoding = 'UTF-8' | ||
|
||
dependencies { | ||
compile 'com.google.api:gax:{{version.gax}}' | ||
testCompile 'com.google.api:gax:{{version.gax}}:testlib' | ||
compile 'com.google.api:gax-httpjson:{{version.gax_httpjson}}' | ||
testCompile 'com.google.api:gax-httpjson:{{version.gax_httpjson}}:testlib' | ||
testCompile '{{maven.junit_junit}}' | ||
{{extra_deps}} | ||
} | ||
|
||
task smokeTest(type: Test) { | ||
filter { | ||
includeTestsMatching "*SmokeTest" | ||
setFailOnNoMatchingTests false | ||
} | ||
} | ||
|
||
test { | ||
exclude "**/*SmokeTest*" | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java { | ||
srcDir 'src/main/java' | ||
} | ||
} | ||
} | ||
|
||
clean { | ||
delete 'all-jars' | ||
} | ||
|
||
task allJars(type: Copy) { | ||
dependsOn test, jar | ||
into 'all-jars' | ||
// Replace with `from configurations.testRuntime, jar` to include test dependencies | ||
from configurations.runtime, jar | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright 2021 Google LLC | ||
// | ||
// Licensed 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. | ||
|
||
package com.google.api.generator; | ||
|
||
import com.google.api.AnnotationsProto; | ||
import com.google.api.ClientProto; | ||
import com.google.api.FieldBehaviorProto; | ||
import com.google.api.ResourceProto; | ||
import com.google.longrunning.OperationsProto; | ||
import com.google.protobuf.ExtensionRegistry; | ||
import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest; | ||
import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse; | ||
import java.io.IOException; | ||
|
||
public class MainDumper { | ||
public static void main(String[] args) throws IOException { | ||
ExtensionRegistry registry = ExtensionRegistry.newInstance(); | ||
registerAllExtensions(registry); | ||
CodeGeneratorRequest request = CodeGeneratorRequest.parseFrom(System.in, registry); | ||
|
||
CodeGeneratorResponse.Builder response = CodeGeneratorResponse.newBuilder(); | ||
response | ||
.setSupportedFeatures(CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL_VALUE) | ||
.addFileBuilder() | ||
.setName("desc-dump.bin") | ||
.setContentBytes(request.toByteString()); | ||
response.build().writeTo(System.out); | ||
} | ||
|
||
/** Register all extensions needed to process API protofiles. */ | ||
private static void registerAllExtensions(ExtensionRegistry extensionRegistry) { | ||
OperationsProto.registerAllExtensions(extensionRegistry); | ||
AnnotationsProto.registerAllExtensions(extensionRegistry); | ||
ClientProto.registerAllExtensions(extensionRegistry); | ||
ResourceProto.registerAllExtensions(extensionRegistry); | ||
FieldBehaviorProto.registerAllExtensions(extensionRegistry); | ||
} | ||
} |
Oops, something went wrong.