Skip to content

Commit

Permalink
AGP 8.0.0対応
Browse files Browse the repository at this point in the history
  • Loading branch information
crow-misia committed Apr 15, 2023
1 parent 1c3437b commit 5cbff37
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 29 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
plugins {
id("com.android.application") apply false
id("com.android.library") apply false
id("io.gitlab.arturbosch.detekt") apply false
kotlin("android") apply false
id("org.jetbrains.kotlin.android") apply false
}

buildscript {
Expand Down
10 changes: 3 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@

[plugins]

gradle = { id = "gradle", version = "7.4.2" }

org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }

io-gitlab-arturbosch-detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.22.0" }
gradle = { id = "gradle", version = "8.0.0" }

[versions]

kotlin = "1.8.20"

[libraries]

dokka-gradle-plugin = "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"

org-jacoco-ant = "org.jacoco:org.jacoco.ant:0.8.9"

dokka-gradle-plugin = "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"

dokka-analysis = "org.jetbrains.dokka:dokka-analysis:1.8.10"

dokka-base = "org.jetbrains.dokka:dokka-base:1.8.10"

javadoc-plugin = "org.jetbrains.dokka:javadoc-plugin:1.8.10"

kotlin-annotation-processing-gradle = { group = "org.jetbrains.kotlin", name = "kotlin-annotation-processing-gradle", version.ref = "kotlin" }
26 changes: 12 additions & 14 deletions location-coroutines/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
id("org.jetbrains.dokka")
id("signing")
id("maven-publish")
kotlin("android")
id("org.jetbrains.kotlin.android")
}

object Maven {
Expand All @@ -31,11 +31,10 @@ group = Maven.groupId
version = Maven.version

android {
buildToolsVersion = "33.0.2"
namespace = "io.github.crow_misia.location_coroutines"
compileSdk = 33

defaultConfig {
namespace = "io.github.crow_misia.location_coroutines"
minSdk = 14
consumerProguardFiles("consumer-proguard-rules.pro")
}
Expand All @@ -50,6 +49,12 @@ android {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

tasks.withType<KotlinJvmCompile>().all {
Expand All @@ -63,20 +68,13 @@ tasks.withType<KotlinJvmCompile>().all {
}

dependencies {
api(Kotlin.stdlib)
api(KotlinX.coroutines.core)
implementation(Kotlin.stdlib)
implementation(KotlinX.coroutines.core)
api(KotlinX.coroutines.android)
api(KotlinX.coroutines.playServices)
api(Google.android.playServices.location)
}

val sourcesJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles sources JAR"
archiveClassifier.set("sources")
from(sourceSets.create("main").allSource)
}

val customDokkaTask by tasks.creating(DokkaTask::class) {
dokkaSourceSets.getByName("main") {
noAndroidSdkLink.set(false)
Expand Down Expand Up @@ -112,7 +110,6 @@ afterEvaluate {
| Version: $version
""".trimMargin())

artifact(sourcesJar)
artifact(javadocJar)

pom {
Expand Down Expand Up @@ -171,13 +168,14 @@ afterEvaluate {
detekt {
buildUponDefaultConfig = true // preconfigure defaults
allRules = false // activate all available (even unstable) rules.
config = files("$rootDir/config/detekt.yml")
config.setFrom(files("$rootDir/config/detekt.yml"))
}

tasks {
withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
// Target version of the generated JVM bytecode. It is used for type resolution.
jvmTarget = "11"

reports {
html.required.set(true)
xml.required.set(true)
Expand Down
6 changes: 3 additions & 3 deletions versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file

plugin.android=7.4.2
plugin.android=8.0.0

plugin.io.gitlab.arturbosch.detekt=1.22.0
plugin.io.gitlab.arturbosch.detekt=1.23.0-RC1

version.androidx.activity=1.7.0

Expand Down Expand Up @@ -39,7 +39,7 @@ version.com.google.android.gms..strict-version-matcher-plugin=1.2.4

version.google.accompanist=0.30.1

version.google.android.material=1.9.0-beta01
version.google.android.material=1.9.0-rc01

version.google.android.play-services-location=21.0.1

Expand Down

0 comments on commit 5cbff37

Please sign in to comment.