Sort dependencies, use api(javax.servlet), implementation(slf4j-api)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0d299bb..bb208d0 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -42,6 +42,26 @@
       run: |
         ./gradlew --no-parallel --no-daemon build javadoc
 
+  linux-avatica:
+    name: 'Linux (JDK 8), Avatica master'
+    runs-on: ubuntu-latest
+    steps:
+    - name: 'Set up JDK 8'
+      uses: actions/setup-java@v1
+      with:
+        java-version: 8
+    - uses: actions/checkout@master
+      with:
+        fetch-depth: 50
+    - name: 'Install Avatica to Maven Local'
+      run: |
+        ./gradlew publishToMavenLocal -Pcalcite.avatica.version=1.0.0-dev-master -PskipJavadoc
+    - name: 'Test Calcite'
+      run: |
+        git clone --branch gradle --depth 100 https://github.com/vlsi/calcite.git ../calcite
+        cd ../calcite
+        ./gradlew --no-parallel --no-daemon build -Pcalcite.avatica.version=1.0.0-dev-master-SNAPSHOT -PenableMavenLocal
+
   mac:
     name: 'macOS (JDK 13)'
     runs-on: macos-latest
diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts
index 704f61a..6dac838 100644
--- a/bom/build.gradle.kts
+++ b/bom/build.gradle.kts
@@ -47,50 +47,38 @@
         // runtime means "the dependency is only for runtime, not for compilation"
         // In other words, marking dependency as "runtime" would avoid accidental
         // dependency on it during compilation
-        apiv("org.slf4j:slf4j-api", "slf4j")
-        apiv("org.slf4j:slf4j-log4j12", "slf4j")
-
+        apiv("com.beust:jcommander")
+        apiv("com.fasterxml.jackson.core:jackson-annotations", "jackson")
+        apiv("com.fasterxml.jackson.core:jackson-core", "jackson")
+        apiv("com.fasterxml.jackson.core:jackson-databind", "jackson")
+        apiv("com.github.stephenc.jcip:jcip-annotations")
+        apiv("com.google.guava:guava")
         apiv("com.google.protobuf:protobuf-java", "protobuf")
-
+        apiv("com.h2database:h2")
+        apiv("javax.servlet:javax.servlet-api", "servlet")
+        apiv("junit:junit")
+        apiv("net.hydromatic:scott-data-hsqldb")
         apiv("org.apache.httpcomponents:httpclient")
         apiv("org.apache.httpcomponents:httpcore")
-
-        apiv("com.fasterxml.jackson.core:jackson-core", "jackson")
-        apiv("com.fasterxml.jackson.core:jackson-annotations", "jackson")
-        apiv("com.fasterxml.jackson.core:jackson-databind", "jackson")
-
-        apiv("junit:junit")
-        apiv("org.hamcrest:hamcrest-core", "hamcrest")
-        apiv("org.mockito:mockito-core", "mockito")
-
-        apiv("javax.servlet:javax.servlet-api", "servlet")
-        apiv("com.google.guava:guava")
-
+        apiv("org.apache.kerby:kerb-client", "kerby")
+        apiv("org.apache.kerby:kerb-core", "kerby")
+        apiv("org.apache.kerby:kerb-simplekdc", "kerby")
+        apiv("org.bouncycastle:bcpkix-jdk15on", "bouncycastle")
+        apiv("org.bouncycastle:bcprov-jdk15on", "bouncycastle")
         apiv("org.eclipse.jetty:jetty-http", "jetty")
         apiv("org.eclipse.jetty:jetty-security", "jetty")
         apiv("org.eclipse.jetty:jetty-server", "jetty")
         apiv("org.eclipse.jetty:jetty-util", "jetty")
-
-        apiv("net.hydromatic:scott-data-hsqldb")
-
-        apiv("org.apache.kerby:kerb-client", "kerby")
-        apiv("org.apache.kerby:kerb-core", "kerby")
-        apiv("org.apache.kerby:kerb-simplekdc", "kerby")
-
+        apiv("org.hamcrest:hamcrest-core", "hamcrest")
         apiv("org.hsqldb:hsqldb")
-        apiv("com.h2database:h2")
-
-        apiv("com.github.stephenc.jcip:jcip-annotations")
-
-        apiv("org.bouncycastle:bcpkix-jdk15on", "bouncycastle")
-        apiv("org.bouncycastle:bcprov-jdk15on", "bouncycastle")
-        apiv("com.beust:jcommander")
-
+        apiv("org.mockito:mockito-core", "mockito")
         apiv("org.ow2.asm:asm")
         apiv("org.ow2.asm:asm-all", "asm")
         apiv("org.ow2.asm:asm-analysis", "asm")
         apiv("org.ow2.asm:asm-commons", "asm")
         apiv("org.ow2.asm:asm-tree", "asm")
         apiv("org.ow2.asm:asm-util", "asm")
+        apiv("org.slf4j:slf4j-api", "slf4j")
+        apiv("org.slf4j:slf4j-log4j12", "slf4j")
     }
 }
diff --git a/build.gradle.kts b/build.gradle.kts
index 44a157c..7756b1e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -160,6 +160,11 @@
     group = "org.apache.calcite.avatica"
     version = buildVersion
 
+    plugins.withId("java-library") {
+        dependencies {
+            "implementation"(platform(project(":bom")))
+        }
+    }
     if (!skipSpotless) {
         apply(plugin = "com.diffplug.gradle.spotless")
         spotless {
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index 08f7fa1..2b3c317 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -33,13 +33,13 @@
 //   and "implementation" is for dependencies that do not participate in API
 dependencies {
     api(project(":metrics"))
-    api("com.google.protobuf:protobuf-java")
-    implementation("org.apache.httpcomponents:httpclient")
-    implementation("org.apache.httpcomponents:httpcore")
-    implementation("com.fasterxml.jackson.core:jackson-core")
     api("com.fasterxml.jackson.core:jackson-annotations")
     api("com.fasterxml.jackson.core:jackson-databind")
-    api("org.slf4j:slf4j-api")
+    api("com.google.protobuf:protobuf-java")
+    implementation("com.fasterxml.jackson.core:jackson-core")
+    implementation("org.apache.httpcomponents:httpclient")
+    implementation("org.apache.httpcomponents:httpcore")
+    implementation("org.slf4j:slf4j-api")
     testImplementation("junit:junit")
     testImplementation("org.mockito:mockito-core")
     testImplementation("org.hamcrest:hamcrest-core")
diff --git a/metrics/build.gradle.kts b/metrics/build.gradle.kts
index 81106dd..71b4278 100644
--- a/metrics/build.gradle.kts
+++ b/metrics/build.gradle.kts
@@ -21,9 +21,8 @@
 }
 
 dependencies {
-    api(platform(project(":bom")))
+    implementation("org.slf4j:slf4j-api")
 
-    api("org.slf4j:slf4j-api")
     testImplementation("junit:junit")
     testImplementation("org.mockito:mockito-core")
     testImplementation("org.hamcrest:hamcrest-core")
diff --git a/server/build.gradle.kts b/server/build.gradle.kts
index 6e98a0b..ce93abf 100644
--- a/server/build.gradle.kts
+++ b/server/build.gradle.kts
@@ -23,32 +23,33 @@
 dependencies {
     api(project(":core"))
     api(project(":metrics"))
-    api("org.slf4j:slf4j-api")
-    implementation("javax.servlet:javax.servlet-api")
-    implementation("com.google.guava:guava")
 
+    api("javax.servlet:javax.servlet-api")
     api("org.eclipse.jetty:jetty-http")
     api("org.eclipse.jetty:jetty-security")
     api("org.eclipse.jetty:jetty-server")
     api("org.eclipse.jetty:jetty-util")
 
+    implementation("org.slf4j:slf4j-api")
+    implementation("com.google.guava:guava")
+
     // TODO: AvaticaSuite includes AvaticaUtilsTest and ConnectStringParserTest from :core
     //   Does it really make sense?
     testImplementation(project(":core", "testClasses"))
 
+    testImplementation("com.github.stephenc.jcip:jcip-annotations")
     testImplementation("junit:junit")
-    testImplementation("org.mockito:mockito-core")
-    testImplementation("org.hamcrest:hamcrest-core")
-
     testImplementation("net.hydromatic:scott-data-hsqldb")
     testImplementation("org.apache.kerby:kerb-client")
     testImplementation("org.apache.kerby:kerb-core")
     testImplementation("org.apache.kerby:kerb-simplekdc")
-    testRuntimeOnly("org.hsqldb:hsqldb")
-    testImplementation("com.github.stephenc.jcip:jcip-annotations")
-    testRuntimeOnly("org.slf4j:slf4j-log4j12")
     testImplementation("org.bouncycastle:bcpkix-jdk15on")
     testImplementation("org.bouncycastle:bcprov-jdk15on")
+    testImplementation("org.hamcrest:hamcrest-core")
+    testImplementation("org.mockito:mockito-core")
+
+    testRuntimeOnly("org.hsqldb:hsqldb")
+    testRuntimeOnly("org.slf4j:slf4j-log4j12")
 }
 
 tasks {
diff --git a/tck/build.gradle.kts b/tck/build.gradle.kts
index 481a7e5..aeeaaaf 100644
--- a/tck/build.gradle.kts
+++ b/tck/build.gradle.kts
@@ -53,9 +53,6 @@
     // they weren't yet provided by the avatica client jar
     shaded("org.slf4j:slf4j-api")
     shaded("org.slf4j:slf4j-log4j12")
-
-    // Can't be api due to https://github.com/johnrengelman/shadow/issues/424
-    implementation(platform(project(":bom")))
 }
 
 tasks {