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

Update Build system #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

10 changes: 10 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,22 @@ android {
viewBinding true
}

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

kotlinOptions {
jvmTarget = "11"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
namespace 'www.sanju.motiontoastapp'

}

Expand Down
7 changes: 3 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="www.sanju.motiontoastapp">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand All @@ -9,11 +8,11 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="www.sanju.motiontoastapp.MainActivity"
<activity
android:name="www.sanju.motiontoastapp.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/www/sanju/motiontoastapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, View.OnLongClick
R.id.deleteBtn -> {
MotionToast.createToast(
this, "Profile Deleted!",
"",
"Your profile has been deleted!",
MotionToastStyle.DELETE,
MotionToast.GRAVITY_BOTTOM,
MotionToast.LONG_DURATION,
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

Expand Down
12 changes: 10 additions & 2 deletions motiontoast/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand All @@ -22,9 +20,19 @@ android {
}
}

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

kotlinOptions {
jvmTarget = "11"
}

buildFeatures {
viewBinding true
}
namespace 'www.sanju.motiontoast'

}

Expand Down
2 changes: 1 addition & 1 deletion motiontoast/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="www.sanju.motiontoast" />
<manifest />
5 changes: 3 additions & 2 deletions motiontoast/src/main/res/layout/full_color_toast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/color_toast_view"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dimen_24"
android:background="@drawable/toast_round_background"
android:backgroundTint="@color/warning_color">
Expand Down Expand Up @@ -50,7 +50,7 @@

<TextView
android:id="@+id/color_toast_description"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_12"
android:layout_marginTop="@dimen/dimen_4"
Expand All @@ -59,6 +59,7 @@
android:ellipsize="marquee"
android:fontFamily="@font/montserrat_regular"
android:maxLines="2"
android:lineHeight="@dimen/dimen_20"
android:text="@string/text_mock_description"
android:textAlignment="textStart"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
Expand Down
24 changes: 13 additions & 11 deletions motiontoast/src/main/res/layout/motion_toast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/motion_toast_view"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dimen_24"
android:background="@android:color/white">

<View
android:id="@+id/colorView"
android:layout_width="@dimen/dimen_12"
android:layout_height="100dp"
android:layout_width="@dimen/dimen_8"
android:layout_height="@dimen/dimen_64"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:background="@drawable/color_view_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/custom_toast_image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginStart="@dimen/dimen_8"
android:layout_width="@dimen/dimen_32"
android:layout_height="@dimen/dimen_32"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dimen_8"
android:layout_toEndOf="@id/colorView"
android:contentDescription="@string/app_name"
android:src="@drawable/ic_info_yellow" />
Expand All @@ -40,16 +41,16 @@

<TextView
android:id="@+id/custom_toast_text"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_12"
android:layout_marginTop="@dimen/dimen_12"
android:layout_marginEnd="@dimen/dimen_12"
android:fontFamily="@font/montserrat_bold"
android:text="@string/text_warning"
android:letterSpacing="0.10"
android:textAllCaps="true"
android:text="@string/text_warning"
android:textAlignment="textStart"
android:textAllCaps="true"
android:textAppearance="@style/TextAppearance.MaterialComponents.Caption"
android:textColor="@android:color/black"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -58,14 +59,15 @@

<TextView
android:id="@+id/custom_toast_description"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dimen_12"
android:layout_marginTop="@dimen/dimen_4"
android:layout_marginEnd="@dimen/dimen_12"
android:layout_marginBottom="@dimen/dimen_12"
android:fontFamily="@font/montserrat_regular"
android:ellipsize="marquee"
android:fontFamily="@font/montserrat_regular"
android:lineHeight="@dimen/dimen_20"
android:maxLines="2"
android:text="@string/text_mock_description"
android:textAlignment="textStart"
Expand Down
1 change: 1 addition & 0 deletions motiontoast/src/main/res/values/dimen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<dimen name="dimen_8">8dp</dimen>
<dimen name="dimen_12">12dp</dimen>
<dimen name="dimen_16">16dp</dimen>
<dimen name="dimen_20">20dp</dimen>
<dimen name="dimen_24">24dp</dimen>
<dimen name="dimen_32">32dp</dimen>
<dimen name="dimen_48">48dp</dimen>
Expand Down