Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce version catalog and migrate gradle files to kts #391

Merged
merged 1 commit into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions app/build.gradle → app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,41 @@
import com.skydoves.balloon.Configuration
import com.skydoves.balloon.Dependencies

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id(libs.plugins.android.application.get().pluginId)
id(libs.plugins.kotlin.android.get().pluginId)
}

android {
compileSdkVersion Configuration.compileSdk
compileSdk = Configuration.compileSdk
defaultConfig {
applicationId "com.skydoves.balloondemo"
minSdkVersion Configuration.minSdk
targetSdkVersion Configuration.targetSdk
versionCode Configuration.versionCode
versionName Configuration.versionName
applicationId = "com.skydoves.balloondemo"
minSdk = Configuration.minSdk
targetSdk = Configuration.targetSdk
versionCode = Configuration.versionCode
versionName = Configuration.versionName
}

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

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

buildFeatures {
viewBinding true
viewBinding = true
}

lintOptions {
abortOnError false
lint {
abortOnError = false
}
}

dependencies {
implementation Dependencies.material
implementation project(":balloon")
implementation(Dependencies.material)
implementation(project(":balloon"))
}

apply from: "$rootDir/spotless/spotless.gradle"
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
</intent-filter>
</activity>
</application>
</manifest>
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/background_gradient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
android:startColor="@color/colorPrimary"
android:endColor="@color/skyBlue"
android:angle="45"/>
</shape>
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/round_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
android:shape="rectangle">
<corners android:radius="5dp" />
<solid android:color="@color/background800" />
</shape>
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/round_button_skyblue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
android:shape="rectangle">
<corners android:radius="5dp" />
<solid android:color="@color/skyBlue" />
</shape>
</shape>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/recyclerView"
app:menu="@menu/menus" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,4 @@
app:itemIconTint="@color/white_93"
app:itemTextColor="@color/white_93"
app:menu="@menu/menus" />
</RelativeLayout>
</RelativeLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/toolbar_custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
android:layout_marginEnd="12dp"
android:src="@drawable/ic_list_white_24dp" />

</androidx.appcompat.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>
2 changes: 1 addition & 1 deletion app/src/main/res/menu/menus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
android:icon="@drawable/ic_settings"
android:title="@string/settings"
app:showAsAction="ifRoom" />
</menu>
</menu>
2 changes: 1 addition & 1 deletion app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
</adaptive-icon>
2 changes: 1 addition & 1 deletion app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
</adaptive-icon>
90 changes: 0 additions & 90 deletions balloon/build.gradle

This file was deleted.

70 changes: 70 additions & 0 deletions balloon/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Designed and developed by 2019 skydoves (Jaewoong Eum)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import com.skydoves.balloon.Configuration
import com.skydoves.balloon.Dependencies

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.kotlin.android.get().pluginId)
}

rootProject.extra.apply {
set("PUBLISH_GROUP_ID", Configuration.artifactGroup)
set("PUBLISH_ARTIFACT_ID", "balloon")
set("PUBLISH_VERSION", rootProject.extra.get("rootVersionName"))
}

apply(from ="${rootDir}/scripts/publish-module.gradle")

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

resourcePrefix = "balloon"

buildFeatures {
viewBinding = true
}

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

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

lint {
abortOnError = false
}
}

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

dependencies {
implementation(Dependencies.appcompat)
implementation(Dependencies.fragmentKtx)
implementation(Dependencies.lifecycle)
implementation(Dependencies.annotation)
}
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_dispose_center.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
android:pivotY="50%"
android:toXScale="0"
android:toYScale="0" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_elastic_center.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
android:pivotY="50%"
android:toXScale="1.0"
android:toYScale="1.0" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_fade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
android:repeatCount="infinite"
android:repeatMode="reverse"
android:toAlpha="1.0" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_fade_in.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
android:duration="200"
android:fromAlpha="0"
android:toAlpha="1.0" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_fade_out.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
android:duration="200"
android:fromAlpha="1.0"
android:toAlpha="0" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_heartbeat_bottom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXScale="90%"
android:toYScale="90%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_heartbeat_center.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXScale="90%"
android:toYScale="90%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_heartbeat_left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXScale="90%"
android:toYScale="90%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_heartbeat_right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXScale="90%"
android:toYScale="90%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_heartbeat_top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXScale="90%"
android:toYScale="90%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_overshoot_center.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
android:pivotY="50%"
android:toXScale="1.0"
android:toYScale="1.0" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_shake_bottom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXDelta="0%"
android:toYDelta="13%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_shake_left.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXDelta="-13%"
android:toYDelta="0%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_shake_right.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXDelta="13%"
android:toYDelta="0%" />
</set>
</set>
2 changes: 1 addition & 1 deletion balloon/src/main/res/anim/balloon_shake_top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
android:repeatMode="reverse"
android:toXDelta="0%"
android:toYDelta="-13%" />
</set>
</set>
Loading