Skip to content

Commit

Permalink
Merge pull request #471 from skydoves/agp/8.1.0
Browse files Browse the repository at this point in the history
Bump AGP 8.1.0, Gradle 8.3.0 and the rest of libraries
  • Loading branch information
skydoves committed Aug 26, 2023
2 parents ec0c62f + 8314b44 commit b694888
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 37 deletions.
8 changes: 5 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ plugins {

android {
compileSdk = Configuration.compileSdk
namespace = "com.skydoves.balloondemo"

defaultConfig {
applicationId = "com.skydoves.balloondemo"
minSdk = Configuration.minSdk
Expand All @@ -31,12 +33,12 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = libs.versions.jvmTarget.get()
jvmTarget = "17"
}

buildFeatures {
Expand Down
19 changes: 17 additions & 2 deletions balloon-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ apply(from ="${rootDir}/scripts/publish-module.gradle")

android {
compileSdk = Configuration.compileSdk
namespace = "com.skydoves.balloon.compose"

defaultConfig {
minSdk = Configuration.minSdk
targetSdk = Configuration.targetSdk
}

buildFeatures {
Expand All @@ -29,7 +30,16 @@ android {
kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get()
}

packagingOptions {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = libs.versions.jvmTarget.get()
}

packaging {
resources {
excludes.add("/META-INF/{AL2.0,LGPL2.1}")
}
Expand All @@ -47,6 +57,11 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
)
}

tasks.withType(JavaCompile::class.java).configureEach {
this.targetCompatibility = libs.versions.jvmTarget.get()
this.sourceCompatibility = libs.versions.jvmTarget.get()
}

dependencies {
api(project(":balloon"))

Expand Down
16 changes: 10 additions & 6 deletions balloon/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ apply(from ="${rootDir}/scripts/publish-module.gradle")

android {
compileSdk = Configuration.compileSdk
namespace = "com.skydoves.balloon"

defaultConfig {
minSdk = Configuration.minSdk
targetSdk = Configuration.targetSdk
}

resourcePrefix = "balloon"
Expand All @@ -42,8 +43,8 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
Expand All @@ -56,9 +57,12 @@ android {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(
"-Xexplicit-api=strict"
)
kotlinOptions.freeCompilerArgs += listOf("-Xexplicit-api=strict")
}

tasks.withType(JavaCompile::class.java).configureEach {
this.targetCompatibility = libs.versions.jvmTarget.get()
this.sourceCompatibility = libs.versions.jvmTarget.get()
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ public class BalloonAnchorOverlayView @JvmOverloads constructor(
invalidate()
}

override fun dispatchDraw(canvas: Canvas?) {
override fun dispatchDraw(canvas: Canvas) {
if (invalidated || bitmap == null || bitmap?.isRecycled == true) {
prepareBitmap()
}

val bitmap = this.bitmap
if (bitmap != null && !bitmap.isRecycled) {
canvas?.drawBitmap(bitmap, 0f, 0f, null)
canvas.drawBitmap(bitmap, 0f, 0f, null)
}
}

Expand Down Expand Up @@ -172,10 +172,12 @@ public class BalloonAnchorOverlayView @JvmOverloads constructor(
canvas.drawRect(anchorRect, paint)
canvas.drawRect(anchorPaddingRect, paddingColorPaint)
}

is BalloonOverlayOval -> {
canvas.drawOval(anchorRect, paint)
canvas.drawOval(anchorPaddingRect, paddingColorPaint)
}

is BalloonOverlayCircle -> {
overlay.radius?.let { radius ->
canvas.drawCircle(anchorRect.centerX(), anchorRect.centerY(), radius, paint)
Expand All @@ -201,6 +203,7 @@ public class BalloonAnchorOverlayView @JvmOverloads constructor(
)
}
}

is BalloonOverlayRoundRect -> {
overlay.radiusPair?.let { radiusPair ->
canvas.drawRoundRect(anchorRect, radiusPair.first, radiusPair.second, paint)
Expand Down
8 changes: 5 additions & 3 deletions benchmark-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ plugins {

android {
compileSdk = Configuration.compileSdk
namespace = "com.skydoves.balloon.benchmark.app"

defaultConfig {
applicationId = "com.skydoves.balloon.benchmark.app"
minSdk = Configuration.minSdk
Expand All @@ -31,12 +33,12 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = libs.versions.jvmTarget.get()
jvmTarget = "17"
}

buildFeatures {
Expand Down
1 change: 1 addition & 0 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {

android {
compileSdk = Configuration.compileSdk
namespace = "com.skydoves.balloon.benchmark"

defaultConfig {
minSdk = Configuration.minSdkBenchmark
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.skydoves.balloon

object Configuration {
const val compileSdk = 33
const val targetSdk = 33
const val compileSdk = 34
const val targetSdk = 34
const val minSdk = 21
const val minSdkBenchmark = 23
const val majorVersion = 1
Expand Down
24 changes: 10 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
[versions]
agp = "7.4.1"
dokka = "1.8.10"
agp = "8.1.0"
dokka = "1.8.20"
nexusPlugin = "1.3.0"
kotlin = "1.8.10"
kotlinBinaryCompatibility = "0.13.1"
javaRelease = "8"
jvmTarget = "1.8"
androidxComposeBom = "2023.06.00"
androidxComposeCompiler = "1.4.4"
kotlin = "1.9.0"
kotlinBinaryCompatibility = "0.13.2"
jvmTarget = "11"
androidxComposeBom = "2023.08.00"
androidxComposeCompiler = "1.5.1"
androidxComposeConstraintLayout = "1.0.1"
androidxMaterial = "1.9.0"
androidxAppcompat = "1.6.1"
androidxActivity = "1.7.2"
androidxFragment = "1.6.0"
androidxFragment = "1.6.1"
androidxLifecycle = "2.6.1"
androidxAnnotation = "1.6.0"
androidxTest = "1.5.2"
baselineProfiles = "1.3.1"
macroBenchmark = "1.2.0-alpha12"
uiAutomator = "2.3.0-alpha02"
macroBenchmark = "1.2.0-beta04"
uiAutomator = "2.3.0-alpha04"
spotless = "6.7.2"

[plugins]
Expand All @@ -32,9 +31,6 @@ kotlin-binary-compatibility = { id = "org.jetbrains.kotlinx.binary-compatibility
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }

[libraries]
agp = { module = "com.android.tools.build:gradle", version.ref = "agp" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }

androidx-material = { module = "com.google.android.material:material", version.ref = "androidxMaterial" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppcompat" }
androidx-fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "androidxFragment" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down

0 comments on commit b694888

Please sign in to comment.