1
0
mirror of https://github.com/google/nomulus synced 2026-02-08 22:10:28 +00:00
Files
nomulus/gradle/proxy/build.gradle
shicong 4866955c76 Unify dependency declarations into one place
This change unified declarations of third party dependencies into
one dependencies.gradle file by reference to this blog
https://medium.com/freelancer-engineering/managing-dependencies-in-multi-project-builds-with-gradle-7626d9c6448d

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=228713862
2019-01-10 16:23:35 -05:00

104 lines
3.6 KiB
Groovy

apply plugin: 'com.google.osdetector'
apply plugin: 'application'
apply plugin: 'com.bmuschko.docker-java-application'
// TODO(jianglai): use plugins block once the osdetctor v1.6.0 works with it.
// see: https://github.com/google/osdetector-gradle-plugin/issues/15
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.0'
}
}
sourceSets {
main {
resources {
exclude "${project.relativePath}/terraform/"
exclude "${project.relativePath}/kubernetes/"
}
}
}
mainClassName = 'google.registry.proxy.ProxyServer'
task deployJar(type: Jar) {
manifest {
attributes 'Main-Class': 'google.registry.proxy.ProxyServer'
}
baseName = 'proxy_server'
version = null
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
// Excludes signature files that accompany some dependency jars, like
// bonuncycastle. It they are present, only classes from those signed jars are
// made available to the class loader.
// see https://discuss.gradle.org/t/signing-a-custom-gradle-plugin-thats-downloaded-by-the-build-system-from-github/1365
exclude "META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"
with jar
}
dependencies {
def deps = rootProject.dependencyMap
compile deps['com.beust:jcommander']
compile deps['com.google.api-client:google-api-client']
compile deps['com.google.apis:google-api-services-cloudkms']
compile deps['com.google.apis:google-api-services-monitoring']
compile deps['com.google.apis:google-api-services-storage']
compile deps['com.google.auto.value:auto-value-annotations']
compile deps['com.google.code.findbugs:jsr305']
compile deps['com.google.code.gson:gson']
compile deps['com.google.dagger:dagger']
compile deps['com.google.flogger:flogger']
compile deps['com.google.guava:guava']
compile deps['com.google.http-client:google-http-client']
compile deps['com.google.monitoring-client:metrics']
compile deps['com.google.monitoring-client:stackdriver']
compile deps['io.netty:netty-buffer']
compile deps['io.netty:netty-codec-http']
compile deps['io.netty:netty-codec']
compile deps['io.netty:netty-common']
compile deps['io.netty:netty-handler']
compile deps['io.netty:netty-transport']
compile deps['javax.inject:javax.inject']
compile deps['joda-time:joda-time']
compile deps['org.bouncycastle:bcpkix-jdk15on']
compile deps['org.bouncycastle:bcprov-jdk15on']
compile project(':util')
runtime deps['com.google.flogger:flogger-system-backend']
runtime deps['com.google.auto.value:auto-value']
runtime deps['io.netty:netty-tcnative-boringssl-static'] + ":${osdetector.classifier}"
testCompile deps['com.google.monitoring-client:contrib']
testCompile deps['com.google.truth:truth']
testCompile deps['org.yaml:snakeyaml']
testCompile deps['junit:junit']
testCompile deps['org.mockito:mockito-all']
testCompile project(':third_party')
testCompile project(path: ':core', configuration: 'testRuntime')
// Include auto-value in compile until nebula-lint understands
// annotationProcessor
annotationProcessor deps['com.google.auto.value:auto-value']
testAnnotationProcessor deps['com.google.auto.value:auto-value']
annotationProcessor deps['com.google.dagger:dagger-compiler']
testAnnotationProcessor deps['com.google.dagger:dagger-compiler']
}
docker {
javaApplication {
// TODO(jianglai): Peg to a specific hash to enable reproducible build.
baseImage = 'openjdk:8-jre-alpine'
ports = [30000, 30001, 30002, 30011, 30012]
}
}
ext.generateDependencyPublications()