title: unresolved supertypes: javax.sql.DataSource
body: <p>I am seeing the following error when trying to compile using gradle.</p>
  <blockquote>
  <p>Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
  class com.zaxxer.hikari.HikariDataSource, unresolved supertypes: javax.sql.DataSource
  Adding -Xextended-compiler-checks argument might provide additional information.</p>
  </blockquote>
  <pre><code>import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  
  plugins {
      //kotlin(&quot;jvm&quot;) version &quot;1.6.0&quot;
  }
  
  group = &quot;com.jasin&quot;
  version = &quot;0.0.1&quot;
  
  dependencies {
      //api(files(&quot;libs/jdbc-stdext-2.0.jar&quot;))
      implementation(&quot;org.ktorm:ktorm-core:3.4.1&quot;)
      implementation(&quot;org.ktorm:ktorm-support-mysql:3.4.1&quot;)
      implementation(&quot;mysql:mysql-connector-java:8.0.25&quot;)
      implementation(&quot;com.zaxxer:HikariCP:5.0.1&quot;)
      implementation(&quot;org.slf4j:slf4j-api:1.7.36&quot;)
      implementation(&quot;org.slf4j:slf4j-simple:1.7.36&quot;)
      testImplementation(kotlin(&quot;test&quot;))
  }
  
  tasks.test {
      useJUnit()
  }
  
  tasks.withType&lt;KotlinCompile&gt;() {
      kotlinOptions.jvmTarget = &quot;11&quot;
  }
  </code></pre>
  <p>If I uncomment the following line</p>
  <pre><code>//api(files(&quot;libs/jdbc-stdext-2.0.jar&quot;))
  </code></pre>
  <p>I get the following type errors</p>
  <blockquote>
  <p>module jdbc.stdext reads package javax.sql from both jdbc.stdext and java.sql</p>
  </blockquote>
  <p>If I recomment this line and try to build again(without cleaning the project), it works. As soon as I clean the project the error reappears. What is exactly going on here and how can I fix this? Any help would be appreciated.</p>
  <p>edit: I should add that this is a multi-module project and it wasn't till I tried to define module-info.java files in separate modules that this error appeared. But the error is specific to one module, the module that I use to access my database that uses connection pooling with hikaricp.</p>
  <p>module-info.java file</p>
  <pre><code>module com.cobis.db {
      requires kotlin.stdlib;
      requires com.zaxxer.hikari;
      requires ktorm.core;
  
      exports com.cobis.db;
      exports com.cobis.db.entities;
      exports com.cobis.db.utilities;
  }
  </code></pre>