From 1ecb1788f0ce7fc3e47a0a09b47ed337890ecdad Mon Sep 17 00:00:00 2001 From: hrishikeshprateek Date: Tue, 1 Jun 2021 13:47:49 +0530 Subject: [PATCH] Added kitchen Core,delivery Partner Core modules --- .idea/gradle.xml | 2 + .../adapters/ChatRecyclerAdapter.java | 4 +- deliveryPartnerCore/.gitignore | 1 + deliveryPartnerCore/build.gradle | 38 +++++++++++++++++++ deliveryPartnerCore/consumer-rules.pro | 0 deliveryPartnerCore/proguard-rules.pro | 21 ++++++++++ .../ExampleInstrumentedTest.java | 26 +++++++++++++ .../src/main/AndroidManifest.xml | 5 +++ .../deliverypartnercore/ExampleUnitTest.java | 17 +++++++++ kitchenCore/.gitignore | 1 + kitchenCore/build.gradle | 38 +++++++++++++++++++ kitchenCore/consumer-rules.pro | 0 kitchenCore/proguard-rules.pro | 21 ++++++++++ .../kitchencore/ExampleInstrumentedTest.java | 26 +++++++++++++ kitchenCore/src/main/AndroidManifest.xml | 5 +++ .../kitchencore/ExampleUnitTest.java | 17 +++++++++ settings.gradle | 2 + 17 files changed, 221 insertions(+), 3 deletions(-) create mode 100644 deliveryPartnerCore/.gitignore create mode 100644 deliveryPartnerCore/build.gradle create mode 100644 deliveryPartnerCore/consumer-rules.pro create mode 100644 deliveryPartnerCore/proguard-rules.pro create mode 100644 deliveryPartnerCore/src/androidTest/java/com/thundersharp/deliverypartnercore/ExampleInstrumentedTest.java create mode 100644 deliveryPartnerCore/src/main/AndroidManifest.xml create mode 100644 deliveryPartnerCore/src/test/java/com/thundersharp/deliverypartnercore/ExampleUnitTest.java create mode 100644 kitchenCore/.gitignore create mode 100644 kitchenCore/build.gradle create mode 100644 kitchenCore/consumer-rules.pro create mode 100644 kitchenCore/proguard-rules.pro create mode 100644 kitchenCore/src/androidTest/java/com/thundersharp/kitchencore/ExampleInstrumentedTest.java create mode 100644 kitchenCore/src/main/AndroidManifest.xml create mode 100644 kitchenCore/src/test/java/com/thundersharp/kitchencore/ExampleUnitTest.java diff --git a/.idea/gradle.xml b/.idea/gradle.xml index e83006f..cfbfca3 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -14,6 +14,8 @@ diff --git a/conversation/src/main/java/com/thundersharp/conversation/adapters/ChatRecyclerAdapter.java b/conversation/src/main/java/com/thundersharp/conversation/adapters/ChatRecyclerAdapter.java index 1765f4b..5186da6 100644 --- a/conversation/src/main/java/com/thundersharp/conversation/adapters/ChatRecyclerAdapter.java +++ b/conversation/src/main/java/com/thundersharp/conversation/adapters/ChatRecyclerAdapter.java @@ -18,9 +18,7 @@ import com.google.firebase.database.DatabaseError; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; -import com.thundersharp.conversation.ChatFragmentInternal; import com.thundersharp.conversation.ChatStarter; -import com.thundersharp.conversation.FirebaseChatMainApp; import com.thundersharp.conversation.R; import com.thundersharp.conversation.model.Chat; import com.thundersharp.conversation.model.OrederBasicDetails; @@ -30,7 +28,6 @@ import java.util.ArrayList; import java.util.List; -import static com.thundersharp.conversation.ChatFragmentInternal.mETxtMessage; import static com.thundersharp.conversation.ChatFragmentInternal.sendmessageRecycler; @@ -91,6 +88,7 @@ public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { if (chatType == ChatStarter.MODE_CHAT_ADMIN){ + sendmessageRecycler.setVisibility(View.VISIBLE); if (TextUtils.equals(mChats.get(position).senderUid, Resturant.RESTURANT_SUPPORT_ID)) { configureMyChatViewHolder((MyChatViewHolder) holder, position); diff --git a/deliveryPartnerCore/.gitignore b/deliveryPartnerCore/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/deliveryPartnerCore/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/deliveryPartnerCore/build.gradle b/deliveryPartnerCore/build.gradle new file mode 100644 index 0000000..d87723a --- /dev/null +++ b/deliveryPartnerCore/build.gradle @@ -0,0 +1,38 @@ +plugins { + id 'com.android.library' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.2" + + defaultConfig { + minSdkVersion 21 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles "consumer-rules.pro" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.3.0' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/deliveryPartnerCore/consumer-rules.pro b/deliveryPartnerCore/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/deliveryPartnerCore/proguard-rules.pro b/deliveryPartnerCore/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/deliveryPartnerCore/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/deliveryPartnerCore/src/androidTest/java/com/thundersharp/deliverypartnercore/ExampleInstrumentedTest.java b/deliveryPartnerCore/src/androidTest/java/com/thundersharp/deliverypartnercore/ExampleInstrumentedTest.java new file mode 100644 index 0000000..fcfe587 --- /dev/null +++ b/deliveryPartnerCore/src/androidTest/java/com/thundersharp/deliverypartnercore/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.thundersharp.deliverypartnercore; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.thundersharp.deliverypartnercore.test", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/deliveryPartnerCore/src/main/AndroidManifest.xml b/deliveryPartnerCore/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0826db0 --- /dev/null +++ b/deliveryPartnerCore/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/deliveryPartnerCore/src/test/java/com/thundersharp/deliverypartnercore/ExampleUnitTest.java b/deliveryPartnerCore/src/test/java/com/thundersharp/deliverypartnercore/ExampleUnitTest.java new file mode 100644 index 0000000..65cd958 --- /dev/null +++ b/deliveryPartnerCore/src/test/java/com/thundersharp/deliverypartnercore/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.thundersharp.deliverypartnercore; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/kitchenCore/.gitignore b/kitchenCore/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/kitchenCore/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/kitchenCore/build.gradle b/kitchenCore/build.gradle new file mode 100644 index 0000000..d87723a --- /dev/null +++ b/kitchenCore/build.gradle @@ -0,0 +1,38 @@ +plugins { + id 'com.android.library' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.2" + + defaultConfig { + minSdkVersion 21 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles "consumer-rules.pro" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.3.0' + implementation 'com.google.android.material:material:1.3.0' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} \ No newline at end of file diff --git a/kitchenCore/consumer-rules.pro b/kitchenCore/consumer-rules.pro new file mode 100644 index 0000000..e69de29 diff --git a/kitchenCore/proguard-rules.pro b/kitchenCore/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/kitchenCore/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/kitchenCore/src/androidTest/java/com/thundersharp/kitchencore/ExampleInstrumentedTest.java b/kitchenCore/src/androidTest/java/com/thundersharp/kitchencore/ExampleInstrumentedTest.java new file mode 100644 index 0000000..fbc38f1 --- /dev/null +++ b/kitchenCore/src/androidTest/java/com/thundersharp/kitchencore/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.thundersharp.kitchencore; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.thundersharp.kitchencore.test", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/kitchenCore/src/main/AndroidManifest.xml b/kitchenCore/src/main/AndroidManifest.xml new file mode 100644 index 0000000..1ed1f64 --- /dev/null +++ b/kitchenCore/src/main/AndroidManifest.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/kitchenCore/src/test/java/com/thundersharp/kitchencore/ExampleUnitTest.java b/kitchenCore/src/test/java/com/thundersharp/kitchencore/ExampleUnitTest.java new file mode 100644 index 0000000..031ee51 --- /dev/null +++ b/kitchenCore/src/test/java/com/thundersharp/kitchencore/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.thundersharp.kitchencore; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index fb8d69a..4a28c06 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,5 @@ +include ':deliveryPartnerCore' +include ':kitchenCore' include ':conversation' include ':billgenerator' include ':payments'