mirror of
https://github.com/google/nomulus.git
synced 2025-08-11 20:19:37 +02:00
Add App Engine Deploy to Gradle build
Add a first pass add Nomulus GAE deployment to our gradle build scripts. This attempt could stand some improvement. In particular: - It currently only deploys to crash, per discussion we will make the environment a parameter. - This uses a different import mechanism from the other plugins (via a "buildscript" section) and it looks like the lint plugin is very similar. I'll experiment with getting it to work that way. - There is a lot of redundancy in the deployment scripts for each module, and given that we have the full power of a general programming language it should be possible for us to reuse the common parts. But that said, this is a pretty good first step and I wanted to put it out there. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=223366370
This commit is contained in:
parent
3eff20ceb5
commit
ec11eae699
6 changed files with 132 additions and 0 deletions
28
gradle/backend/build.gradle
Normal file
28
gradle/backend/build.gradle
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
plugins {
|
||||||
|
id 'war'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set this directory before applying the appengine plugin so that the plugin
|
||||||
|
// will recognize this as an app-engine standard app (and also obtains the
|
||||||
|
// appengine-web.xml from the correct location)
|
||||||
|
project.convention.plugins['war'].webAppDirName =
|
||||||
|
'../../java/google/registry/env/crash/backend'
|
||||||
|
|
||||||
|
apply plugin: 'com.google.cloud.tools.appengine'
|
||||||
|
|
||||||
|
// Get the web.xml file for the service.
|
||||||
|
war {
|
||||||
|
webInf {
|
||||||
|
from '../../java/google/registry/env/common/backend/WEB-INF'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
appengine {
|
||||||
|
deploy {
|
||||||
|
project = 'domain-registry-crash'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
}
|
|
@ -1,3 +1,14 @@
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.3'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'nebula.lint' version '10.3.1'
|
id 'nebula.lint' version '10.3.1'
|
||||||
// Config helper for annotation processors such as AutoValue and Dagger.
|
// Config helper for annotation processors such as AutoValue and Dagger.
|
||||||
|
@ -19,6 +30,9 @@ subprojects {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Exclude all of the module deployment projects.
|
||||||
|
if (project.name in ['default', 'backend', 'tools', 'pubapi']) return
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'nebula.lint'
|
apply plugin: 'nebula.lint'
|
||||||
apply plugin: 'net.ltgt.apt'
|
apply plugin: 'net.ltgt.apt'
|
||||||
|
|
29
gradle/default/build.gradle
Normal file
29
gradle/default/build.gradle
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
plugins {
|
||||||
|
id 'war'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set this directory before applying the appengine plugin so that the plugin
|
||||||
|
// will recognize this as an app-engine standard app (and also obtains the
|
||||||
|
// appengine-web.xml from the correct location)
|
||||||
|
project.convention.plugins['war'].webAppDirName =
|
||||||
|
'../../java/google/registry/env/crash/default'
|
||||||
|
|
||||||
|
apply plugin: 'com.google.cloud.tools.appengine'
|
||||||
|
|
||||||
|
// Get the web.xml and cron.xml files for the service.
|
||||||
|
war {
|
||||||
|
webInf {
|
||||||
|
from '../../java/google/registry/env/common/default/WEB-INF'
|
||||||
|
from '../../java/google/registry/env/crash/tools/WEB-INF/cron.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
appengine {
|
||||||
|
deploy {
|
||||||
|
project = 'domain-registry-crash'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
}
|
29
gradle/pubapi/build.gradle
Normal file
29
gradle/pubapi/build.gradle
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
plugins {
|
||||||
|
id 'war'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set this directory before applying the appengine plugin so that the plugin
|
||||||
|
// will recognize this as an app-engine standard app (and also obtains the
|
||||||
|
// appengine-web.xml from the correct location)
|
||||||
|
project.convention.plugins['war'].webAppDirName =
|
||||||
|
'../../java/google/registry/env/crash/pubapi'
|
||||||
|
|
||||||
|
apply plugin: 'com.google.cloud.tools.appengine'
|
||||||
|
|
||||||
|
// Get the web.xml file for the service.
|
||||||
|
war {
|
||||||
|
webInf {
|
||||||
|
from '../../java/google/registry/env/common/pubapi/WEB-INF'
|
||||||
|
from '../../java/google/registry/env/crash/pubapi/WEB-INF/cron.xml'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
appengine {
|
||||||
|
deploy {
|
||||||
|
project = 'domain-registry-crash'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
}
|
|
@ -4,3 +4,7 @@ include 'core'
|
||||||
include 'proxy'
|
include 'proxy'
|
||||||
include 'third_party'
|
include 'third_party'
|
||||||
include 'util'
|
include 'util'
|
||||||
|
include 'default'
|
||||||
|
include 'backend'
|
||||||
|
include 'tools'
|
||||||
|
include 'pubapi'
|
||||||
|
|
28
gradle/tools/build.gradle
Normal file
28
gradle/tools/build.gradle
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
plugins {
|
||||||
|
id 'war'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set this directory before applying the appengine plugin so that the plugin
|
||||||
|
// will recognize this as an app-engine standard app (and also obtains the
|
||||||
|
// appengine-web.xml from the correct location)
|
||||||
|
project.convention.plugins['war'].webAppDirName =
|
||||||
|
'../../java/google/registry/env/crash/tools'
|
||||||
|
|
||||||
|
apply plugin: 'com.google.cloud.tools.appengine'
|
||||||
|
|
||||||
|
// Get the web.xml file for the service.
|
||||||
|
war {
|
||||||
|
webInf {
|
||||||
|
from '../../java/google/registry/env/common/tools/WEB-INF'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
appengine {
|
||||||
|
deploy {
|
||||||
|
project = 'domain-registry-crash'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':core')
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue