diff --git a/.editorconfig b/.editorconfig index 1d967e8f2a..6c98409464 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,4 +4,8 @@ continuation_indent_size=2 insert_final_newline=true ij_kotlin_allow_trailing_comma=true ij_kotlin_allow_trailing_comma_on_call_site=true -ktlint_disabled_rules=annotation,argument-list-wrapping,spacing-between-declarations-with-annotations,filename +ktlint_standard_annotation=disabled +ktlint_standard_argument-list-wrapping=disabled +ktlint_standard_spacing-between-declarations-with-annotations=disabled +ktlint_standard_filename=disabled +ktlint_standard_property-naming=disabled diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c5b9aecf6..7d64e02d14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - java_version: [11] + java_version: [17] steps: - name: Checkout diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index a574d3e86f..a30616550f 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -15,11 +15,11 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Install JDK 11 + - name: Install JDK 17 uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: 11 + java-version: 17 - name: Setup gradle uses: gradle/gradle-build-action@v2 diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index ae99a02d2a..402c374850 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -15,11 +15,11 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Install JDK 11 + - name: Install JDK 17 uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: 11 + java-version: 17 - name: Setup gradle uses: gradle/gradle-build-action@v2 diff --git a/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt b/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt index 59261a351c..5b7fec894d 100644 --- a/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt +++ b/app/src/androidTest/kotlin/com/vanniktech/emoji/sample/screenshots/ScreenshotsTest.kt @@ -67,7 +67,6 @@ import tools.fastlane.screengrab.locale.LocaleTestRule IOS("iOS"), TWITTER("Twitter"), FACEBOOK("Facebook"), - ; } private fun start(variant: Variant) { diff --git a/app/src/debug/AndroidManifest.xml b/app/src/debug/AndroidManifest.xml index 0279217573..f063515682 100644 --- a/app/src/debug/AndroidManifest.xml +++ b/app/src/debug/AndroidManifest.xml @@ -2,7 +2,7 @@ - + diff --git a/app/src/main/kotlin/com/vanniktech/emoji/sample/CustomViewActivity.kt b/app/src/main/kotlin/com/vanniktech/emoji/sample/CustomViewActivity.kt index 533ef9062f..7e9b29fd1c 100644 --- a/app/src/main/kotlin/com/vanniktech/emoji/sample/CustomViewActivity.kt +++ b/app/src/main/kotlin/com/vanniktech/emoji/sample/CustomViewActivity.kt @@ -28,6 +28,7 @@ import com.vanniktech.emoji.installDisableKeyboardInput import com.vanniktech.emoji.installForceSingleEmoji import com.vanniktech.emoji.sample.databinding.ViewCustomBinding import com.vanniktech.emoji.traits.EmojiTrait +import com.vanniktech.emoji.R as EmojiR class CustomViewActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { @@ -73,7 +74,7 @@ class CustomViewActivity : AppCompatActivity() { val emojiPopup = EmojiPopup( rootView = this, - keyboardAnimationStyle = R.style.emoji_fade_animation_style, + keyboardAnimationStyle = EmojiR.style.emoji_fade_animation_style, editText = binding.editText, ) binding.editText.installDisableKeyboardInput(emojiPopup) diff --git a/app/src/main/kotlin/com/vanniktech/emoji/sample/MainActivity.kt b/app/src/main/kotlin/com/vanniktech/emoji/sample/MainActivity.kt index d334825985..231bbef1e9 100644 --- a/app/src/main/kotlin/com/vanniktech/emoji/sample/MainActivity.kt +++ b/app/src/main/kotlin/com/vanniktech/emoji/sample/MainActivity.kt @@ -46,6 +46,7 @@ import com.vanniktech.emoji.sample.databinding.ActivityMainBinding import com.vanniktech.emoji.traits.EmojiTrait import com.vanniktech.emoji.twitter.TwitterEmojiProvider import timber.log.Timber +import com.vanniktech.emoji.R as EmojiR // We don't care about duplicated code in the sample. class MainActivity : AppCompatActivity() { @@ -78,7 +79,7 @@ class MainActivity : AppCompatActivity() { onSoftKeyboardOpenListener = { px -> Timber.d(TAG, "Opened soft keyboard with height $px") }, onEmojiPopupDismissListener = { binding.chatEmoji.setImageResource(R.drawable.ic_emojis) }, onSoftKeyboardCloseListener = { Timber.d(TAG, "Closed soft keyboard") }, - keyboardAnimationStyle = R.style.emoji_fade_animation_style, + keyboardAnimationStyle = EmojiR.style.emoji_fade_animation_style, // theming = com.vanniktech.emoji.EmojiTheming( // Uncomment this to use runtime theming. // backgroundColor = android.graphics.Color.BLACK, // primaryColor = android.graphics.Color.BLUE, diff --git a/app/src/main/kotlin/com/vanniktech/emoji/sample/MainDialog.kt b/app/src/main/kotlin/com/vanniktech/emoji/sample/MainDialog.kt index fd3ce923c8..47c6a2e5bd 100644 --- a/app/src/main/kotlin/com/vanniktech/emoji/sample/MainDialog.kt +++ b/app/src/main/kotlin/com/vanniktech/emoji/sample/MainDialog.kt @@ -32,6 +32,7 @@ import com.vanniktech.emoji.Emoji import com.vanniktech.emoji.EmojiPopup import com.vanniktech.emoji.material.MaterialEmojiLayoutFactory import timber.log.Timber +import com.vanniktech.emoji.R as EmojiR // We don't care about duplicated code in the sample. class MainDialog : DialogFragment() { @@ -63,7 +64,7 @@ class MainDialog : DialogFragment() { onSoftKeyboardOpenListener = { px -> Timber.d(TAG, "Opened soft keyboard with height $px") }, onEmojiPopupDismissListener = { emojiButton.setImageResource(R.drawable.ic_emojis) }, onSoftKeyboardCloseListener = { Timber.d(TAG, "Closed soft keyboard") }, - keyboardAnimationStyle = R.style.emoji_fade_animation_style, + keyboardAnimationStyle = EmojiR.style.emoji_fade_animation_style, ) emojiButton.setColorFilter(ContextCompat.getColor(context, R.color.colorPrimary), PorterDuff.Mode.SRC_IN) diff --git a/emoji-facebook/build.gradle b/emoji-facebook/build.gradle index d673be8a74..283acf924c 100644 --- a/emoji-facebook/build.gradle +++ b/emoji-facebook/build.gradle @@ -1,7 +1,6 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.kotlin.multiplatform") - id("org.jetbrains.kotlin.native.cocoapods") id("com.android.library") id("org.jetbrains.kotlin.plugin.parcelize") id("me.tylerbwong.gradle.metalava") diff --git a/emoji-facebook/emoji_facebook.podspec b/emoji-facebook/emoji_facebook.podspec deleted file mode 100644 index f421d3a189..0000000000 --- a/emoji-facebook/emoji_facebook.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'emoji_facebook' - spec.version = '0.18.0-SNAPSHOT' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/emoji_facebook.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':emoji-facebook', - 'PRODUCT_MODULE_NAME' => 'emoji_facebook', - } - - spec.script_phases = [ - { - :name => 'Build emoji_facebook', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/emoji-google-compat/build.gradle b/emoji-google-compat/build.gradle index 3584b793b0..7fc91f4c13 100644 --- a/emoji-google-compat/build.gradle +++ b/emoji-google-compat/build.gradle @@ -1,7 +1,6 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.kotlin.multiplatform") - id("org.jetbrains.kotlin.native.cocoapods") id("com.android.library") id("org.jetbrains.kotlin.plugin.parcelize") id("me.tylerbwong.gradle.metalava") diff --git a/emoji-google-compat/emoji_google_compat.podspec b/emoji-google-compat/emoji_google_compat.podspec deleted file mode 100644 index c5fe8616f1..0000000000 --- a/emoji-google-compat/emoji_google_compat.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'emoji_google_compat' - spec.version = '0.18.0-SNAPSHOT' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/emoji_google_compat.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':emoji-google-compat', - 'PRODUCT_MODULE_NAME' => 'emoji_google_compat', - } - - spec.script_phases = [ - { - :name => 'Build emoji_google_compat', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/emoji-google/build.gradle b/emoji-google/build.gradle index a29d48c192..6efe50d9cb 100644 --- a/emoji-google/build.gradle +++ b/emoji-google/build.gradle @@ -1,7 +1,6 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.kotlin.multiplatform") - id("org.jetbrains.kotlin.native.cocoapods") id("com.android.library") id("org.jetbrains.kotlin.plugin.parcelize") id("me.tylerbwong.gradle.metalava") diff --git a/emoji-google/emoji_google.podspec b/emoji-google/emoji_google.podspec deleted file mode 100644 index 1328bf333c..0000000000 --- a/emoji-google/emoji_google.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'emoji_google' - spec.version = '0.18.0-SNAPSHOT' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/emoji_google.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':emoji-google', - 'PRODUCT_MODULE_NAME' => 'emoji_google', - } - - spec.script_phases = [ - { - :name => 'Build emoji_google', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/emoji-ios/build.gradle b/emoji-ios/build.gradle index cdd8889f44..382217fdf2 100644 --- a/emoji-ios/build.gradle +++ b/emoji-ios/build.gradle @@ -1,7 +1,6 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.kotlin.multiplatform") - id("org.jetbrains.kotlin.native.cocoapods") id("com.android.library") id("org.jetbrains.kotlin.plugin.parcelize") id("me.tylerbwong.gradle.metalava") diff --git a/emoji-ios/emoji_ios.podspec b/emoji-ios/emoji_ios.podspec deleted file mode 100644 index f6d774975d..0000000000 --- a/emoji-ios/emoji_ios.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'emoji_ios' - spec.version = '0.18.0-SNAPSHOT' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/emoji_ios.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':emoji-ios', - 'PRODUCT_MODULE_NAME' => 'emoji_ios', - } - - spec.script_phases = [ - { - :name => 'Build emoji_ios', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/emoji-material/build.gradle b/emoji-material/build.gradle index 94b3453def..8cc49a4c8a 100644 --- a/emoji-material/build.gradle +++ b/emoji-material/build.gradle @@ -1,7 +1,6 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.kotlin.multiplatform") - id("org.jetbrains.kotlin.native.cocoapods") id("com.android.library") id("org.jetbrains.kotlin.plugin.parcelize") id("me.tylerbwong.gradle.metalava") diff --git a/emoji-material/emoji_material.podspec b/emoji-material/emoji_material.podspec deleted file mode 100644 index c5535f6c6b..0000000000 --- a/emoji-material/emoji_material.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'emoji_material' - spec.version = '0.18.0-SNAPSHOT' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/emoji_material.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':emoji-material', - 'PRODUCT_MODULE_NAME' => 'emoji_material', - } - - spec.script_phases = [ - { - :name => 'Build emoji_material', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/emoji-twitter/build.gradle b/emoji-twitter/build.gradle index 93bd33dd8e..567d17e9ec 100644 --- a/emoji-twitter/build.gradle +++ b/emoji-twitter/build.gradle @@ -1,7 +1,6 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.kotlin.multiplatform") - id("org.jetbrains.kotlin.native.cocoapods") id("com.android.library") id("org.jetbrains.kotlin.plugin.parcelize") id("me.tylerbwong.gradle.metalava") diff --git a/emoji-twitter/emoji_twitter.podspec b/emoji-twitter/emoji_twitter.podspec deleted file mode 100644 index cdf94e992a..0000000000 --- a/emoji-twitter/emoji_twitter.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'emoji_twitter' - spec.version = '0.18.0-SNAPSHOT' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/emoji_twitter.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':emoji-twitter', - 'PRODUCT_MODULE_NAME' => 'emoji_twitter', - } - - spec.script_phases = [ - { - :name => 'Build emoji_twitter', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/emoji/build.gradle b/emoji/build.gradle index ac795b075c..8ddae88506 100644 --- a/emoji/build.gradle +++ b/emoji/build.gradle @@ -1,7 +1,6 @@ plugins { id("org.jetbrains.dokka") id("org.jetbrains.kotlin.multiplatform") - id("org.jetbrains.kotlin.native.cocoapods") id("com.android.library") id("org.jetbrains.kotlin.plugin.parcelize") id("me.tylerbwong.gradle.metalava") diff --git a/emoji/emoji.podspec b/emoji/emoji.podspec deleted file mode 100644 index ac7d928a1c..0000000000 --- a/emoji/emoji.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'emoji' - spec.version = '0.18.0-SNAPSHOT' - spec.homepage = '' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = '' - spec.vendored_frameworks = 'build/cocoapods/framework/emoji.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':emoji', - 'PRODUCT_MODULE_NAME' => 'emoji', - } - - spec.script_phases = [ - { - :name => 'Build emoji', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then - echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiPopup.kt b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiPopup.kt index 33a613bbe1..4558eedd8c 100644 --- a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiPopup.kt +++ b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiPopup.kt @@ -229,7 +229,7 @@ class EmojiPopup @JvmOverloads constructor( rootView, Gravity.NO_GRAVITY, 0, Utils.getProperHeight(context) + popupWindowHeight, ) - }, delay.toLong(),) + }, delay.toLong()) onEmojiPopupShownListener?.onEmojiPopupShown() } diff --git a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiTheming.kt b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiTheming.kt index 56c7e0d1e6..59eb707b57 100644 --- a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiTheming.kt +++ b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/EmojiTheming.kt @@ -34,8 +34,8 @@ import com.vanniktech.emoji.internal.Utils companion object { fun from(context: Context) = EmojiTheming( backgroundColor = Utils.resolveColor(context, R.attr.emojiBackgroundColor, R.color.emoji_background_color), - primaryColor = Utils.resolveColor(context, R.attr.colorPrimary, R.color.emoji_primary_color), - secondaryColor = Utils.resolveColor(context, R.attr.colorAccent, R.color.emoji_secondary_color), + primaryColor = Utils.resolveColor(context, android.R.attr.colorPrimary, R.color.emoji_primary_color), + secondaryColor = Utils.resolveColor(context, android.R.attr.colorAccent, R.color.emoji_secondary_color), dividerColor = Utils.resolveColor(context, R.attr.emojiDividerColor, R.color.emoji_divider_color), textColor = Utils.resolveColor(context, R.attr.emojiTextColor, R.color.emoji_text_color), textSecondaryColor = Utils.resolveColor(context, R.attr.emojiTextSecondaryColor, R.color.emoji_text_secondary_color), diff --git a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/internal/EmojiSearchDialog.kt b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/internal/EmojiSearchDialog.kt index 8099b02382..6c8df7416d 100644 --- a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/internal/EmojiSearchDialog.kt +++ b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/internal/EmojiSearchDialog.kt @@ -107,14 +107,14 @@ internal class EmojiSearchDialog : DialogFragment() { handler.post { adapter.update(emojis, marginStart = null) } - }, 300, TimeUnit.MILLISECONDS,) + }, 300, TimeUnit.MILLISECONDS) } }, ) editText.postDelayed({ editText.showKeyboardAndFocus() - }, 300L,) + }, 300L) return dialog } diff --git a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/traits/SearchInPlaceTrait.kt b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/traits/SearchInPlaceTrait.kt index fadbdbb40c..0d96bf6198 100644 --- a/emoji/src/androidMain/kotlin/com/vanniktech/emoji/traits/SearchInPlaceTrait.kt +++ b/emoji/src/androidMain/kotlin/com/vanniktech/emoji/traits/SearchInPlaceTrait.kt @@ -68,7 +68,7 @@ class SearchInPlaceTrait( } else { popup.dismiss() } - }, 300L,) + }, 300L) } } editText.addTextChangedListener(watcher) diff --git a/emoji/src/jvmMain/kotlin/com/vanniktech/emoji/commonParcelableJvmApi.kt b/emoji/src/jvmMain/kotlin/com/vanniktech/emoji/commonParcelableJvmApi.kt index 8e831cd7f5..1a06cde4de 100644 --- a/emoji/src/jvmMain/kotlin/com/vanniktech/emoji/commonParcelableJvmApi.kt +++ b/emoji/src/jvmMain/kotlin/com/vanniktech/emoji/commonParcelableJvmApi.kt @@ -1,4 +1,6 @@ -// ktlint-disable filename + +@file:Suppress("ktlint:standard:filename") + package com.vanniktech.emoji actual interface Parcelable diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3f1062b1ac..9385fa6269 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,9 +3,9 @@ minSdk = "21" compileSdk = "33" targetSdk = "33" -androidgradleplugin = "7.4.2" +androidgradleplugin = "8.0.2" kotlin = "1.8.22" -ktlint = "0.47.1" +ktlint = "0.50.0" [libraries] androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" } @@ -26,7 +26,7 @@ leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", ve material = { module = "com.google.android.material:material", version = "1.9.0" } plugin-android-cache-fix = { module = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin", version = "2.7.2" } plugin-androidgradleplugin = { module = "com.android.tools.build:gradle", version.ref = "androidgradleplugin" } -plugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.8.10" } +plugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version = "1.8.20" } plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } plugin-licensee = { module = "app.cash.licensee:licensee-gradle-plugin", version = "1.7.0" } plugin-metalava = { module = "me.tylerbwong.gradle.metalava:plugin", version = "0.3.3" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index afba109285..033e24c4cd 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a8e0c38ef9..bf01c4d1f1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d65..fcb6fca147 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ done 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"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +130,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +144,7 @@ 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 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then done fi + +# 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"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in