Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Nov 20, 2023
1 parent 7cfb278 commit a72d554
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.google.devtools.ksp.gradle.KspTask
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import java.net.URI
import org.jetbrains.dokka.gradle.DokkaTask
Expand Down Expand Up @@ -87,15 +88,19 @@ subprojects {
project.tasks.withType<JavaCompile>().configureEach { options.release.set(jvmTargetProvider) }
}
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(libs.versions.jvmTarget.map(JvmTarget::fromTarget))
freeCompilerArgs.addAll("-Xjsr305=strict", "-progressive")
// TODO disabled because Gradle's Kotlin handling is silly
// https://github.com/gradle/gradle/issues/16779
// allWarningsAsErrors = true
tasks
.withType<KotlinCompile>()
.matching { it !is KspTask }
.configureEach {
compilerOptions {
jvmTarget.set(libs.versions.jvmTarget.map(JvmTarget::fromTarget))
freeCompilerArgs.addAll("-Xjsr305=strict")
progressiveMode.set(true)
// TODO disabled because Gradle's Kotlin handling is silly
// https://github.com/gradle/gradle/issues/16779
// allWarningsAsErrors = true
}
}
}
if (
project.name != "sample" && !project.path.contains("sample") && !project.path.contains("test")
) {
Expand Down

0 comments on commit a72d554

Please sign in to comment.