Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
180 changes: 180 additions & 0 deletions generated/java/gapic-google-cloud-container-v1/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
buildscript {
repositories {
mavenCentral()
}
}

apply plugin: 'java'
apply plugin: 'signing'
apply plugin: 'maven'

description = 'Sample client library for google-cloud-container-v1'
group = "com.google.api"
version = "0.1.24"
sourceCompatibility = 1.7
targetCompatibility = 1.7

repositories {
mavenCentral()
mavenLocal()
}

dependencies {
compile project(":grpc-google-cloud-container-v1"),
'com.google.api:gax:1.15.0',
'com.google.api:gax-grpc:1.15.0',
'commons-cli:commons-cli:1.4',
'commons-lang:commons-lang:2.6',
// This dependency needs to be update-to-date with the version that gRPC expects.
'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork26'
}

sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
}

jar {
from {
(configurations.runtime).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'com.google.cloud.container.v1.SampleApp'
)
}
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

signing {
required false
sign configurations.archives
}

if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name "com.google.api.grpc:google-cloud-container-v1"
description project.description
url 'https://github.com/googleapis/googleapis'
scm {
url 'https://github.com/googleapis/googleapis'
connection 'scm:git:https://github.com/googleapis/googleapis'
}

licenses {
license {
name 'Apache-2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'Google Inc'
name 'Google Inc'
email 'googleapis-packages@google.com'
url 'https://github.com/googleapis/googleapis'
organization 'Google LLC'
organizationUrl 'https://www.google.com'
}
}
}
}
}
}
} else {
task failUploadArchives << {
throw new GradleException("uploadArchives needs ossrhUsername and ossrhPassword "
+ "to be set. They can be set inside your ~/.gradle/gradle.properties file.")
}
tasks.uploadArchives.dependsOn(failUploadArchives)
}

task checkOutGhPages << {
if (!new File(javaDocRoot).exists()) {
exec {
workingDir projectDir
commandLine 'git', 'clone', '--branch', 'gh-pages',
'--single-branch', 'git@github.com:googleapis/googleapis.git', 'tmp_gh-pages'
}
}
}

task copyFilesToGhPages {
dependsOn 'checkOutGhPages'
dependsOn 'javadoc'
doLast {
def newSiteDirPath = javaDocRoot + "/java/${packageName}/${project.version}/apidocs/"
new File(newSiteDirPath).mkdirs()
copy {
from 'build/docs/javadoc'
into newSiteDirPath
}
}
}

// Regenerates the gh-pages branch under tmp_gh-pages
task updateDocs {
dependsOn 'copyFilesToGhPages'
doLast {
def outputContent = new File(projectDir.getAbsolutePath() + '/templates/apidocs_index.html.template').text
outputContent = outputContent.replace('{{siteVersion}}', project.version)
outputContent = outputContent.replace('{{packageName}}', packageName)
new File(javaDocRoot + "/java/${packageName}/apidocs").mkdirs()
new File(javaDocRoot + "/java/${packageName}/apidocs/index.html").write(outputContent)
exec {
workingDir javaDocRoot
commandLine 'git', 'add', '.'
}
exec {
workingDir javaDocRoot
commandLine 'git', 'commit', '-m', "Regenerating docs for ${packageName} ${project.version}"
}
println 'New docs have been generated under tmp_gh-pages and have been committed;'
println 'Next they just need to be pushed with "git push".'
}
}

// Regenerates and push the gh-pages branch under tmp_gh-pages
task updateAndPushDocs {
dependsOn 'updateDocs'
doLast {
exec {
workingDir javaDocRoot
commandLine 'git', 'push'
println "New docs have been pushed to Github for ${packageName} ${project.version}"
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Mon May 02 22:26:16 PDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip
160 changes: 160 additions & 0 deletions generated/java/gapic-google-cloud-container-v1/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading