<NME> build.gradle
<BEF> plugins {
    id 'com.github.johnrengelman.shadow' version '6.0.0'
}

description = 'Conscrypt: Testing'

sourceSets {
    main {
}

dependencies {
    compile project(':conscrypt-constants'),
            libraries.bouncycastle_provider,
            libraries.bouncycastle_apis,
            libraries.guava,
            libraries.junit,
    compileOnly project(':conscrypt-constants'),
                project(':conscrypt-libcore-stub'),
                project(':conscrypt-android-stub')

    compile libraries.bouncycastle_apis,
            libraries.bouncycastle_provider
}

<MSG> Bundle conscrypt-constants in deployed artifacts. (#122)

Fixes #119
<DFF> @@ -9,8 +9,10 @@ sourceSets {
 }
 
 dependencies {
-    compile project(':conscrypt-constants'),
-            libraries.bouncycastle_provider,
+    // Only compile against this. Other modules will embed the generated code directly.
+    compileOnly project(':conscrypt-constants')
+
+    compile libraries.bouncycastle_provider,
             libraries.bouncycastle_apis,
             libraries.guava,
             libraries.junit,

{'commit': 'diff --git a/android/build.gradle b/android/build.gradle\nindex 35ff4aa2..4e9c5581 100644\n--- a/android/build.gradle\n+++ b/android/build.gradle\n@@ -26,6 +26,11 @@ if (androidSdkInstalled) {\n     apply plugin: \'com.android.library\'\n     apply plugin: \'com.github.dcendents.android-maven\'\n \n+    // Since we\'re not taking a direct dependency on the constants module, we need to add an\n+    // explicit task dependency to make sure the code is generated.\n+    evaluationDependsOn(\':conscrypt-constants\')\n+    preBuild.dependsOn project(\':conscrypt-constants\').build\n+\n     android {\n         compileSdkVersion androidTargetSdkVersion\n         buildToolsVersion androidBuildToolsVersion\n@@ -72,6 +77,8 @@ if (androidSdkInstalled) {\n                         "${rootDir}/common/src/main/java",\n                         "src/main/java"\n                 ]\n+                // Requires evaluationDependsOn(\':conscrypt-constants\') above.\n+                srcDirs += project(\':conscrypt-constants\').sourceSets.main.java.srcDirs\n             }\n         }\n         externalNativeBuild {\n@@ -89,7 +96,6 @@ if (androidSdkInstalled) {\n         androidTestCompile(\'com.android.support.test.espresso:espresso-core:2.2.2\', {\n             exclude group: \'com.android.support\', module: \'support-annotations\'\n         })\n-        compile project(\':conscrypt-constants\')\n         provided project(\':conscrypt-android-stub\')\n     }\n } else {\ndiff --git a/constants/build.gradle b/constants/build.gradle\nindex 99b749e6..ce17c4d2 100644\n--- a/constants/build.gradle\n+++ b/constants/build.gradle\n@@ -65,3 +65,8 @@ model {\n         }\n     }\n }\n+\n+\n+// Don\'t include this artifact in the distribution.\n+tasks.install.enabled = false\n+tasks.uploadArchives.enabled = false;\ndiff --git a/openjdk/build.gradle b/openjdk/build.gradle\nindex 87dd63f6..1f5c7019 100644\n--- a/openjdk/build.gradle\n+++ b/openjdk/build.gradle\n@@ -25,6 +25,7 @@ sourceSets {\n     main {\n         java {\n             srcDirs += "${rootDir}/common/src/main/java"\n+            srcDirs += project(\':conscrypt-constants\').sourceSets.main.java.srcDirs\n         }\n     }\n }\n@@ -34,9 +35,11 @@ jar.manifest {\n     attributes \'BoringSSL-Version\' : boringSslVersion\n }\n \n-dependencies {\n-    compile project(\':conscrypt-constants\')\n+// Since we\'re not taking a direct dependency on the constants module, we need to add an\n+// explicit task dependency to make sure the code is generated.\n+compileJava.dependsOn project(\':conscrypt-constants\').build\n \n+dependencies {\n     testCompile project(\':conscrypt-testing\'),\n                 libraries.junit,\n                 libraries.mockito\ndiff --git a/testing/build.gradle b/testing/build.gradle\nindex 372b13f2..90a17001 100644\n--- a/testing/build.gradle\n+++ b/testing/build.gradle\n@@ -9,8 +9,10 @@ sourceSets {\n }\n \n dependencies {\n-    compile project(\':conscrypt-constants\'),\n-            libraries.bouncycastle_provider,\n+    // Only compile against this. Other modules will embed the generated code directly.\n+    compileOnly project(\':conscrypt-constants\')\n+\n+    compile libraries.bouncycastle_provider,\n             libraries.bouncycastle_apis,\n             libraries.guava,\n             libraries.junit,\n', 'commit_subject': 'Bundle conscrypt-constants in deployed artifacts. (#122)', 'repo_name': 'google/conscrypt', 'committer': {'name': 'GitHub', 'email': '1505422b2465e9a84f6fdfaa161078890c593f06@github.com', 'time_sec': '1488306191', 'tz_offset': '-480', 'date': {'seconds': '1488306191'}}, 'commit_tree': 'a0ac0dcb40d2b24d7ee1e12e041906c012fae151', 'commit_message': 'Bundle conscrypt-constants in deployed artifacts. (#122)\n\nFixes #119', 'language_name': 'Python', 'license': 'apache-2.0', 'hunks': "@@ -9,8 +9,10 @@ sourceSets {\n }\n \n dependencies {\n-    compile project(':conscrypt-constants'),\n-            libraries.bouncycastle_provider,\n+    // Only compile against this. Other modules will embed the generated code directly.\n+    compileOnly project(':conscrypt-constants')\n+\n+    compile libraries.bouncycastle_provider,\n             libraries.bouncycastle_apis,\n             libraries.guava,\n             libraries.junit,\n", 'addition_count': 4, 'deletion_count': 2, 'src_file': 'a/testing/build.gradle', 'tgt_file': 'b/testing/build.gradle', 'file_extension': '.gradle', 'before_file': "plugins {\n    id 'com.github.johnrengelman.shadow' version '6.0.0'\n}\n\ndescription = 'Conscrypt: Testing'\n\nsourceSets {\n    main {\n}\n\ndependencies {\n    compile project(':conscrypt-constants'),\n            libraries.bouncycastle_provider,\n            libraries.bouncycastle_apis,\n            libraries.guava,\n            libraries.junit,\n    compileOnly project(':conscrypt-constants'),\n                project(':conscrypt-libcore-stub'),\n                project(':conscrypt-android-stub')\n\n    compile libraries.bouncycastle_apis,\n            libraries.bouncycastle_provider\n}\n", 'message': 'Bundle conscrypt-constants in deployed artifacts. (#122)\n\nFixes #119', 'author_name': 'GitHub', 'lang': 'gradle'}