Skip to content

Commit

Permalink
feat: updated Kotlin and dokka
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso committed Sep 19, 2023
1 parent f1e505d commit 5998cc2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
35 changes: 19 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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")
}
}
}

Expand All @@ -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"
}

Expand Down
7 changes: 4 additions & 3 deletions maps-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,6 +37,9 @@ android {
freeCompilerArgs += '-Xexplicit-api=strict'
jvmTarget = "1.8"
}
buildFeatures {
viewBinding true
}
namespace 'com.google.maps.android.ktx'
}

Expand Down
9 changes: 5 additions & 4 deletions maps-utils-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,7 +27,7 @@ android {
consumerProguardFiles 'consumer-rules.pro'
}

libraryVariants.all {
libraryVariants.configureEach {
it.generateBuildConfig.enabled = false
}

Expand All @@ -42,6 +40,9 @@ android {
freeCompilerArgs += '-Xexplicit-api=strict'
jvmTarget = "1.8"
}
buildFeatures {
viewBinding true
}
namespace 'com.google.maps.android.ktx.utils'
}

Expand Down

0 comments on commit 5998cc2

Please sign in to comment.