From ab1f2c05901fce27b2c1fe7457675f2346dbec41 Mon Sep 17 00:00:00 2001 From: Aviran Abady Date: Mon, 27 Dec 2021 10:58:17 +0200 Subject: [PATCH] Release 1.1.5 Added publishing scripts for Maven Central Updated all dependencies to latest versions --- .gitignore | 10 +- README.md | 19 +- app/build.gradle | 26 +- app/src/main/AndroidManifest.xml | 1 + .../aviran/cookiebarsample/MainFragment.kt | 3 +- app/src/main/res/layout/custom_cookie.xml | 22 +- build.gradle | 28 +- cookiebar2/build.gradle | 41 ++- .../java/org/aviran/cookiebar2/Cookie.java | 1 - gradle.properties | 18 -- gradle/wrapper/gradle-wrapper.jar | Bin 53636 -> 59536 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 290 +++++++++++------- gradlew.bat | 179 ++++++----- jitpack.yml | 5 + 15 files changed, 377 insertions(+), 269 deletions(-) create mode 100644 jitpack.yml diff --git a/.gitignore b/.gitignore index 5d18add..dde539d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Created by https://www.gitignore.io/api/android,androidstudio - +#gradle.properties +#gradlew +#gradlew.bat ### Android ### # Built application files @@ -170,8 +172,6 @@ fabric.properties # End of https://www.gitignore.io/api/android,androidstudio -deploy.gradle -deploy.properties -bintray.properties - +#gradle/* +publishing-scripts/* diff --git a/README.md b/README.md index 9360721..6b510aa 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,31 @@ [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-CookieBar2-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/6122) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6474fc01133444e0b6f615d9b1af8589)](https://www.codacy.com/app/AviranAbady/CookieBar2?utm_source=github.com&utm_medium=referral&utm_content=AviranAbady/CookieBar2&utm_campaign=badger) [![AndroidWeekly335](https://img.shields.io/badge/Android%20Weekly-%23335-brightgreen)](http://androidweekly.net/issues/issue-335) [![](https://jitpack.io/v/AviranAbady/CookieBar2.svg)](https://jitpack.io/#AviranAbady/CookieBar2) -[![](https://img.shields.io/bintray/dt/aviran/projects/cookiebar2)](https://bintray.com/beta/#/aviran/projects/cookiebar2?tab=statistics) CookieBar 2 =============== -CookieBar is a lightweight library for showing a brief message at the top or bottom of the screen.

+CookieBar is a lightweight UI/UX library for displaying an interactive message on the screen.

```gradle -implementation 'org.aviran.cookiebar2:cookiebar2:1.1.4' +implementation 'org.aviran.cookiebar2:cookiebar2:1.1.5' +``` +CookieBar2 is now hosted in Maven Central, make sure you have `mavenCentral()` added to your repositories in `build.gradle` + +``` +buildscript { + ... + repositories { + ... + mavenCentral() + } +} ``` ## Screenshot -Main differences from the original Cookiebar library are: +Latest additions to CookieBar2: * Swipe to dismiss has been added. * Programmatic dismiss functionality added. diff --git a/app/build.gradle b/app/build.gradle index e6942a1..1b58b83 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 30 + compileSdkVersion 31 buildToolsVersion "30.0.2" defaultConfig { applicationId "org.aviran.cookiebarsample" minSdkVersion 15 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 1 versionName "1.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' @@ -19,27 +19,25 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = '1.8' + buildFeatures { + viewBinding true } + } + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0' - implementation 'androidx.navigation:navigation-ui-ktx:2.3.0' + implementation 'com.google.android.material:material:1.4.0' + implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5' + implementation 'androidx.navigation:navigation-ui-ktx:2.3.5' implementation 'androidx.legacy:legacy-support-v4:1.0.0' androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'androidx.appcompat:appcompat:1.2.0' - testImplementation 'junit:junit:4.12' + implementation 'androidx.appcompat:appcompat:1.4.0' + testImplementation 'junit:junit:4.13.1' implementation project(path: ':cookiebar2') - implementation 'androidx.constraintlayout:constraintlayout:2.0.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.2' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7ec0c58..a42f25f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,6 +10,7 @@ android:supportsRtl="true" android:theme="@style/AppTheme"> diff --git a/app/src/main/java/org/aviran/cookiebarsample/MainFragment.kt b/app/src/main/java/org/aviran/cookiebarsample/MainFragment.kt index a6929bd..95697d8 100644 --- a/app/src/main/java/org/aviran/cookiebarsample/MainFragment.kt +++ b/app/src/main/java/org/aviran/cookiebarsample/MainFragment.kt @@ -6,7 +6,6 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Button -import android.widget.Toast import androidx.fragment.app.Fragment import kotlinx.android.synthetic.main.fragment_layout.* import org.aviran.cookiebar2.CookieBar @@ -17,7 +16,7 @@ import org.aviran.cookiebar2.CookieBarDismissListener.DismissType */ class MainFragment : Fragment() { - var topCookieCounter = 0 + private var topCookieCounter = 0 override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/app/src/main/res/layout/custom_cookie.xml b/app/src/main/res/layout/custom_cookie.xml index 089d9b8..e3a69f6 100644 --- a/app/src/main/res/layout/custom_cookie.xml +++ b/app/src/main/res/layout/custom_cookie.xml @@ -16,9 +16,13 @@ android:layout_marginTop="8dp" android:layout_marginBottom="16dp" android:src="@mipmap/ic_launcher" + app:layout_constraintBottom_toTopOf="@+id/custom_cookie_btn_new" - app:layout_constraintTop_toTopOf="parent" - tools:layout_editor_absoluteX="36dp" /> + + + app:layout_constraintEnd_toEndOf="@+id/custom_cookie_btn_new" + app:layout_constraintStart_toStartOf="@+id/custom_cookie_btn_new" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/iv_icon" />