Commit graph

17 commits

Author SHA1 Message Date
weiminyu
431f42d813 Upgrade truth to v0.44
Also upgraded Guava to 27.1-jre and truth java8 extension to v0.44.

Also removed lockfiles no longer in use in Gradle 5.4.

Follow up change will update bazel dependencies.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=246515393
2019-05-06 16:39:17 -04:00
shicong
387042bf3a Enable flow documentation in external build
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241934689
2019-04-05 11:49:49 -04:00
shicong
aae1e42da8 Use Docker Java API to manage container for WebDriver
Previously we had a few customized Gradle build task to manage
the Docker container for provisioning browser and ChromeDriverService
used by WebDriver tests. This CL changed to use a java library
from testcontainers.org to achieve the same purpose. The main
benefit of it is that we can expect to run the WebDriver tests
from IDE going forward.

Also, this CL refactored the structure of WebDriver related classes
to have JUnit rule to manage the lifecycle of WebDriver instance,
this is also compatible with the API from testcontainers library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241539861
2019-04-05 11:38:16 -04:00
mmuller
f7dbaf1f81 Convert update_dependency procedure to use gradle proxy
Collect the set of dependencies using the gradle proxy and push to GCS using
gcs_sync.

TESTED: Verified that the script works against both unupdated and up-to-date
dependency sets, verified that the proxy server is destroyed after completion.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241529357
2019-04-05 11:36:41 -04:00
jianglai
e280d5f0af Upgrade to Gradle 5.3
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240179344
2019-03-29 15:57:52 -04:00
Ben McIlwain
351eba3f6d Allow third_party/java_src/gtld/ to use :mockito2_for_third_party
In [] a change would have been made to your project that is incompatible with
your open source integration. To make sure the open source variant of your
project remains working, we have eagerly updated your open source copy to use
Mockito 2. This CL integrates that change into [].

Please read []and
understand the consequences of this change.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=238445356
2019-03-20 14:25:28 -04:00
shicong
bc3bdc7347 Upgrade the version of google/errorprone plug-in
This CL upgraded google/errorprone plug-in to 2.3.3 and resolved
some warnings detected from the plug-in.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=238047862
2019-03-20 14:25:28 -04:00
gbrodman
50e0a9b532 Refactor common email sending utility
The main thrust of this is to create a common POJO that contains email content in a simple way, then have one class that converts that to an email and sends it. Any class that uses email should only have to deal with creating that POJO.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237883643
2019-03-20 14:25:28 -04:00
shicong
984aed94a2 Update many dependencies to latest version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237514773
2019-03-08 18:39:42 -05:00
weiminyu
eb8d80f7ad Ensure gradle build has only one servlet-api
Use javax.servlet:servlet-api:2.5 and exclude all other implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237505707
2019-03-08 18:38:09 -05:00
jianglai
b573b10ae1 Remove backported MockitoJUnitRule
Mockito in third_party is updated to 1.10. We do not need to backport this rule anymore.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237496086
2019-03-08 18:35:00 -05:00
shicong
76028ba1b4 Partially externalize WebDriver tests
This change does a few things:

  1. Partially externalized WebDriver tests by using ChromeDriver
     as an implementation of WebDriver API in the external build.
  2. Refactored WebDriverRule.java to decouple the creation and
     using of WebDriver related stuff so we can have different
     implementations in internal and external builds.
  3. Refactored the usage of some internal libraries to have a
     central place to store all of them to make it easier to
     remove them in the external build.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233661757
2019-02-13 16:11:02 -05:00
mmuller
36605849ea Move the lockfiles back to where they should have been
It looks like I must have somehow duplicated the absolute path when I copied
these, this puts them in the right place (I think...)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233412326
2019-02-12 11:18:09 -05:00
jianglai
b19563f69d Use Maven repository on GCS for Cloud Build
This CL changes the Cloud Build flows to retrieve dependencies from our self-hosted GCS repository, to ensure that the release build are reproducible and hermetic (Note that it is still not truely reproducible as the dependency publishing process will override any existing artifacts in GCS with the current artifacts in Maven central. This is an issue that we should fix later).

There are a couple of changes involved to get this working:

1. Changed internal repo location to pull from the new repo.

2. Remove jcenter repo. It is only used to pull in the docker gradle plugin, which is not used. We instead build the deploy jar file with Gradle and build the docker image with a Dockerfile. The docker gradle plugin artifacts uploaded to GCS cannot be read because it is using some special classifier which seems to not be preserved when uploading. The java application plugin is also removed because it is only used by the docker gradle plugin.

3. Removed netty tcnative library classifier. It does not appear to be actually used (the jar downloaded from Maven central is an uber jar) and the classifier again interferes with downloading the artifacts from GCS.

4. Removed the cyclic dependency of the util project on itself. It was added because the nebula linter wanted it, which I think is an erroneous warning which should be reported upstream. The cyclic dependency was not a problem before (for yet unknown reasons), but it seems like when we force the dependency resolution (by calling project.generateDependencyPublications during configuration stage) it exacerbated the hidden issue and caused a cyclic task dependency in the util project, which is fatal. Now Nebula will complain again, but the warning is considered benign and will not cause the build to fail.

5. Added the nebula dependency lock files. We need these files when using the GCS maven repo because the we only upload artifacts after conflict resolution to GCS. If both v1 and v2 of the same library are requested in the dependency graph, only one will be uploaded. If we do not have the lock files in place, when building from GCS maven repo, Gradle will try to first find both v1 and v2 in the repo (which fails because v1 is not present in the repo), before proceeding to select v2 to use.

6. Refactored the code to upload Maven artifacts to GCS. We need to manually edit the POM file to reproduce the dependencies for each artifact so that they are all put in the classpath during compilation. Before, the POM files do not have any dependency information, which causes compilation to fail because transitive dependencies are not loaded (even though they are present in the GCS repo).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=233408051
2019-02-11 11:24:12 -05:00
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
jianglai
f46f817f9e Create proxy Docker image with Gradle
This CL adds two ways to build an docker image with gradle:

1) Adds a :proxy:deployJar task that builds an uber jar that contains all runtime dependencies. The jar can then be add to a docker image by calling docker with the added Dockerfile. The base image for this image can be both distroless java or openjdk:alpine.

2) Uses the Gradle distribution plugin to build a distribution tar file that contains all dependencies (as separate jar files) and a run script that sets up the classpath before calling the main class. Then the docker application plugin can build a docker image (with the dockerBuildImage task) using the application tar file. This only works with openjdk:alpline base image as the distroless java image does not contain a shell and therefore the script created by the distribution plugin cannot be launched.

We may later decide to use one of the method and remove the other.

Also adds an outcast test pattern that caused the tests to be flaky.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222145192
2018-11-19 18:19:27 -05:00
jianglai
997b49f7ca Move util to its separate project
It will make it easier later to have the proxy project depend on it, rather
than on the entire core project

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222081994
2018-11-19 18:16:03 -05:00