diff --git a/app/build.gradle b/app/build.gradle index e5d5672..a5a88ad 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,8 +21,7 @@ plugins { } android { - compileSdkVersion versions.android.compileSdk - buildToolsVersion versions.android.buildTools + compileSdk versions.android.compileSdk defaultConfig { applicationId "com.google.maps.android.ktx.demo" diff --git a/build.gradle b/build.gradle index 133ec38..374334d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ /** - * Copyright 2020 Google Inc. + * Copyright 2023 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ buildscript { 'junit' : '1.1.1', ], 'junit' : '4.12', - 'kotlin' : '1.6.21', + 'kotlin' : '1.8.21', 'kotlinxCoroutines': '1.6.0', 'mockito' : '3.0.0', 'mockitoKotlin' : '2.2.0', @@ -69,7 +69,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:7.4.2' - classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.10.1' + classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.9.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin" classpath 'com.hiya:jacoco-android:0.2' classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" @@ -115,15 +115,16 @@ subprojects { project -> apply plugin: 'signing' // Documentation - dokka { - outputFormat = 'html' - outputDirectory = "$buildDir/documentation" - configuration { - includeNonPublic = false - skipEmptyPackages = true - skipDeprecated = true - reportUndocumented = true - jdkVersion = 8 + tasks.named("dokkaHtml") { + outputDirectory.set(file("${buildDir}/documentation")) + dokkaSourceSets { + configureEach { + skipDeprecated.set(true) + jdkVersion.set(8) + skipEmptyPackages.set(true) + reportUndocumented.set(true) + displayName.set("JVM") + } } } @@ -132,18 +133,20 @@ subprojects { project -> toolVersion = "0.8.7" } - tasks.withType(Test) { + + tasks.withType(Test).configureEach { jacoco.includeNoLocationClasses = true jacoco.excludes = ['jdk.internal.*'] } - task sourcesJar(type: Jar) { + tasks.register('sourcesJar', Jar) { from android.sourceSets.main.java.source archiveClassifier = "sources" } - task dokkaJar(type: Jar, dependsOn: dokka) { - from dokka.outputDirectory + tasks.register('dokkaJar', Jar) { + dependsOn dokkaHtml + from dokkaHtml.outputDirectory archiveClassifier = "javadoc" } diff --git a/maps-ktx/build.gradle b/maps-ktx/build.gradle index 8a9f43e..2bae399 100644 --- a/maps-ktx/build.gradle +++ b/maps-ktx/build.gradle @@ -17,11 +17,9 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion versions.android.compileSdk - buildToolsVersion versions.android.buildTools + compileSdk versions.android.compileSdk defaultConfig { minSdkVersion versions.android.minSdk @@ -39,6 +37,9 @@ android { freeCompilerArgs += '-Xexplicit-api=strict' jvmTarget = "1.8" } + buildFeatures { + viewBinding true + } namespace 'com.google.maps.android.ktx' } diff --git a/maps-utils-ktx/build.gradle b/maps-utils-ktx/build.gradle index 067b6b3..15f3038 100644 --- a/maps-utils-ktx/build.gradle +++ b/maps-utils-ktx/build.gradle @@ -16,11 +16,9 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion versions.android.compileSdk - buildToolsVersion versions.android.buildTools + compileSdk versions.android.compileSdk defaultConfig { minSdkVersion versions.android.minSdk @@ -29,7 +27,7 @@ android { consumerProguardFiles 'consumer-rules.pro' } - libraryVariants.all { + libraryVariants.configureEach { it.generateBuildConfig.enabled = false } @@ -42,6 +40,9 @@ android { freeCompilerArgs += '-Xexplicit-api=strict' jvmTarget = "1.8" } + buildFeatures { + viewBinding true + } namespace 'com.google.maps.android.ktx.utils' }