Added new Project Stock Transfer and Recieve

parent 0328dfa1
POSSTOCK
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>
\ No newline at end of file
......@@ -4,17 +4,16 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="JDK" />
<option name="gradleJvm" value="jbr-17" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
......@@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 30
compileSdkVersion 33
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "w.soulofpluto.posstock"
applicationId "w.soulofpluto.posstockauditrecieving"
minSdkVersion 16
targetSdkVersion 30
targetSdkVersion 33
versionCode 2
versionName "1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
......@@ -47,5 +47,7 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.android.support:multidex:1.0.3'
}
\ No newline at end of file
......@@ -9,7 +9,7 @@
"client_info": {
"mobilesdk_app_id": "1:503097399483:android:836d8165b3e50f7be6f19e",
"android_client_info": {
"package_name": "w.soulofpluto.posstock"
"package_name": "w.soulofpluto.posstockauditrecieving"
}
},
"oauth_client": [
......@@ -17,7 +17,7 @@
"client_id": "503097399483-trqntkot7dvg8sv0eou1n766ug8ikt24.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "w.soulofpluto.posstock",
"package_name": "w.soulofpluto.posstockauditrecieving",
"certificate_hash": "0c48f6fd7e869b837d0608cb7c2cdbc084c0552b"
}
},
......
{
"project_info": {
"project_number": "503097399483",
"project_id": "posstockandsale",
"storage_bucket": "posstockandsale.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:503097399483:android:836d8165b3e50f7be6f19e",
"android_client_info": {
"package_name": "w.soulofpluto.posstock"
}
},
"oauth_client": [
{
"client_id": "503097399483-trqntkot7dvg8sv0eou1n766ug8ikt24.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "w.soulofpluto.posstock",
"certificate_hash": "0c48f6fd7e869b837d0608cb7c2cdbc084c0552b"
}
},
{
"client_id": "503097399483-2fmt335f3lug1ds4a2sjkmqir5onssje.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyASvVmZ2XqEbqjJfEZOzIewIgPFrRRvIPM"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "503097399483-2fmt335f3lug1ds4a2sjkmqir5onssje.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="w.soulofpluto.posstockaudit">
package="w.soulofpluto.posstockauditrecieving">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
......@@ -32,9 +32,10 @@
</uses-library> -->
<activity
android:name="w.soulofpluto.posstockaudit.SplashActivity"
android:name="w.soulofpluto.posstockauditrecieving.SplashActivity"
android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
......@@ -42,47 +43,47 @@
</activity>
<activity
android:name="w.soulofpluto.posstockaudit.Login"
android:name="w.soulofpluto.posstockauditrecieving.Login"
android:windowSoftInputMode="adjustResize|stateHidden"
android:screenOrientation="portrait">
</activity>
<activity
android:name="w.soulofpluto.posstockaudit.HomeActivity"
android:name="w.soulofpluto.posstockauditrecieving.HomeActivity"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize">
</activity>
<activity
android:name="w.soulofpluto.posstockaudit.DashBoardActivity"
android:name="w.soulofpluto.posstockauditrecieving.DashBoardActivity"
android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize">
</activity>
<activity
android:name="w.soulofpluto.posstockaudit.MainActivity"
android:name="w.soulofpluto.posstockauditrecieving.MainActivity"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize">
</activity>
<activity
android:name="w.soulofpluto.posstockaudit.PlanDetails"
android:name="w.soulofpluto.posstockauditrecieving.PlanDetails"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize"
android:windowSoftInputMode="adjustNothing">
</activity>
<activity
android:name="w.soulofpluto.posstockaudit.RackWiseQty"
android:name="w.soulofpluto.posstockauditrecieving.RackWiseQty"
android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize">
</activity>
<activity
android:name="w.soulofpluto.posstockaudit.SearchByBarcode"
android:name="w.soulofpluto.posstockauditrecieving.SearchByBarcode"
android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|screenSize">
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.app.ActivityManager;
import android.content.Context;
......@@ -12,7 +12,6 @@ import static android.content.Context.ACTIVITY_SERVICE;
*/
public class AppUtils {
public static void deleteCache(Context context) {
Log.e("AppUtils ====<","Calling deleteCache");
try {
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
/*
Create by Ramesh Babu
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.app.Activity;
import android.app.ProgressDialog;
......@@ -31,6 +31,7 @@ public class Constants{
//public static String BASE_URL = "http://182.18.167.139/";
//public static String BASE_URL = "http://192.168.34.16/";
public static String BASE_URL = "http://posapi.plutokm.com/";
//public static String BASE_URL = "http://192.168.34.16/";
public static String MenuBar = Constants.BASE_URL + "/Users/generateUserMenuBarLinksForAndroidApp";
public static String Logout = Constants.BASE_URL + "/login/doLogout/";
public static String Login = Constants.BASE_URL + "/login/doLogin";
......@@ -65,8 +66,6 @@ public class Constants{
public static StringBuilder stringBuilder;
public static void getToast(Context context, String data){
/* ((Activity)context).runOnUiThread(() -> {
});*/
Toast toast = Toast.makeText(context, data, Toast.LENGTH_SHORT);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
/*
/*
Create by Ramesh Babu
*/
......@@ -25,6 +25,7 @@ public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder
private Context context;
private ArrayList<Plans> arrayList;
public boolean status = false;
public CustomAdapter(Context context, ArrayList<Plans> storesArrayList){
this.context = context;
this.arrayList = storesArrayList;
......@@ -40,8 +41,8 @@ public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder
@Override
public void onBindViewHolder(@NonNull CustomAdapter.ViewHolder holder, final int position){
final Plans items = arrayList.get(position);
holder.plan_id.setText("PLAN ID : "+items.getPlanId());
holder.plan_name.setText("NAME : "+items.getName());
holder.plan_id.setText ("PLAN ID : " +items.getPlanId());
holder.plan_name.setText("NAME : " +items.getName());
holder.view_section.setOnClickListener(view -> {
final Dialog dialog = new Dialog(context);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
......@@ -53,17 +54,17 @@ public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder
TextView section = dialog.findViewById(R.id.plan_section);
TextView division = dialog.findViewById(R.id.plan_division);
ImageView close = dialog.findViewById(R.id.close);
section.setText(Html.fromHtml(Constants.Sec +items.getSection()));
division.setText(Html.fromHtml(Constants.div+items.getDivision()));
section.setText (Html.fromHtml(Constants.Sec +items.getSection()));
division.setText(Html.fromHtml(Constants.div +items.getDivision()));
close.setOnClickListener(view1 -> dialog.dismiss());
});
holder.start_scan.setOnClickListener(view -> {
if(TextUtils.isEmpty(holder.rack_no.getText().toString())){
if (TextUtils.isEmpty(holder.rack_no.getText().toString())) {
Constants.getToast(context,"Please Enter Rack No");
}else{
if(holder.rack_no.getText().toString().length()<= 3) {
} else {
if (holder.rack_no.getText().toString().length()<= 4) {
PlanDetails.start(context, items, holder.rack_no.getText().toString());
}else{
} else {
Constants.getToast(context,"Enter Valid Rack No");
holder.rack_no.setText("");
holder.rack_no.requestFocus();
......@@ -76,6 +77,7 @@ public class CustomAdapter extends RecyclerView.Adapter<CustomAdapter.ViewHolder
public int getItemCount(){
return arrayList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder{
public TextView plan_id,plan_name;
Button start_scan,view_section;
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.content.Intent;
import android.os.Bundle;
......@@ -7,7 +7,6 @@ import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.webkit.WebStorage;
import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
......@@ -20,10 +19,9 @@ import com.squareup.okhttp.Response;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.nio.file.FileSystemAlreadyExistsException;
import java.util.concurrent.TimeUnit;
/*
/*
Create by Ramesh Babu
*/
......@@ -49,7 +47,7 @@ public class DashBoardActivity extends AppCompatActivity implements View.OnClick
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
stock_audit .setOnClickListener(this);
rack_qty .setOnClickListener(this);
searchBy_Barcode.setOnClickListener(this);
searchBy_Barcode .setOnClickListener(this);
transfer .setOnClickListener(this);
version .setText(Html.fromHtml(Constants.Ver_Text +Constants.VERSION));
}
......@@ -90,7 +88,7 @@ public class DashBoardActivity extends AppCompatActivity implements View.OnClick
.build();
client.newCall(request).enqueue(new Callback(){
@Override
public void onFailure(Request request, IOException e){
public void onFailure (Request request, IOException e){
Constants.ProgressDialogDismiss();
}
@Override
......@@ -126,11 +124,11 @@ public class DashBoardActivity extends AppCompatActivity implements View.OnClick
public void onClick(View view){
switch(view.getId()){
case R.id.stock_audit:
Intent in_main = new Intent(this,MainActivity.class);
Intent in_main = new Intent(this, MainActivity.class);
startActivity(in_main);
break;
case R.id.rack_qty:
Intent in_rack = new Intent(this,RackWiseQty.class);
Intent in_rack = new Intent(this, RackWiseQty.class);
startActivity(in_rack);
break;
case R.id.searchby_barcode:
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
/*
/*
Create by Ramesh Babu
*/
public interface DataInterface {
public interface DataInterface {
void onDeliveryData(int code, String data, String Id);
void onDeliveryFail(String fail);
void onDeliveryDataRemove(int code, String data);
void onDeliveryFailRemove(String fail);
void onLogoutData(int code, String data);
void onLogoutFail(String fail);
void onFinalData(int code, String finaldata);
void onFinalFail(String finalfail);
void onFinalData(int code, String data);
void onFinalFail(String fail);
void onCustomerName(int code,String name);
void onCustomerNameFail(String fail);
}
}
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.content.Context;
import android.os.Handler;
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.Manifest;
import android.content.pm.PackageManager;
......@@ -31,12 +31,15 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static w.soulofpluto.posstockaudit.Constants.Logout;
import static w.soulofpluto.posstockauditrecieving.Constants.Logout;
/*
Create by Ramesh Babu
*/
//1111
//180685gk
public class HomeActivity extends AppCompatActivity {
Toolbar home_toolbar;
static PreferenceManager preferenceManager;
......@@ -207,7 +210,7 @@ import static w.soulofpluto.posstockaudit.Constants.Logout;
preferenceManager.setLogged(false);
preferenceManager.setCustToken("");
preferenceManager.setStoreId("");
preferenceManager.setBLUETOOTH("");
//preferenceManager.setBLUETOOTH("");
Login.Logout(HomeActivity.this);
} else {
Constants.getToast(HomeActivity.this, jsonObject.getString("msg"));
......@@ -239,5 +242,4 @@ import static w.soulofpluto.posstockaudit.Constants.Logout;
.show();
}
}
}
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.app.Activity;
import android.content.Context;
......@@ -31,14 +31,13 @@ import java.io.IOException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.concurrent.TimeUnit;
import static w.soulofpluto.posstockaudit.Constants.JSON;
import static w.soulofpluto.posstockauditrecieving.Constants.JSON;
/*
Create by Ramesh Babu
*/
public class Login extends AppCompatActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener{
private EditText userId, password;
private Spinner storeId;
private Button submit;
......@@ -49,7 +48,6 @@ public class Login extends AppCompatActivity implements View.OnClickListener, Ad
private String Store_Name;
public static void Logout(Context context){
//AppUtils.clearAppData(context);
Activity activity = (Activity) context;
Intent in_logout = new Intent(context, Login.class);
in_logout.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
......@@ -201,7 +199,7 @@ public class Login extends AppCompatActivity implements View.OnClickListener, Ad
}else{
runOnUiThread(() -> Constants.getToast(Login.this,e.getMessage()));
}
}//7842734567
}
@Override
public void onResponse(final Response response) throws IOException{
Constants.ProgressDialogDismiss();
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.app.ActivityManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
......@@ -30,8 +29,8 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import static w.soulofpluto.posstockaudit.Constants.JSON;
import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
import static w.soulofpluto.posstockauditrecieving.Constants.JSON;
import static w.soulofpluto.posstockauditrecieving.Constants.getDateWithOffset;
public class MainActivity extends AppCompatActivity {
Toolbar main_toolbar;
......@@ -54,11 +53,11 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onStart() {
if (Constants.isNetworkAvailable(MainActivity.this)) {
if(Constants.isNetworkAvailable(MainActivity.this)) {
AppUtils.deleteCache(MainActivity.this);
FetchData(Constants.Dashboard);
Constants.ProgressDialogShow(MainActivity.this);
} else {
}else {
Constants.getToast(MainActivity.this, getResources().getString(R.string.connection));
}
super.onStart();
......@@ -127,7 +126,6 @@ public class MainActivity extends AppCompatActivity {
break;
case R.id.dashboard_logout:
if (Constants.isNetworkAvailable(MainActivity.this)) {
Logout(Constants.Logout + preferenceManager.getUserId());
Constants.ProgressDialogShow(MainActivity.this);
} else {
......@@ -146,7 +144,9 @@ public class MainActivity extends AppCompatActivity {
Date todayDate = new Date();
Date from = getDateWithOffset(-Constants.Value, new Date());
String fromDate = currentDate.format(from);
Log.e("From Date", fromDate);
String thisDate = currentDate.format(todayDate);
Log.e("Today Date", thisDate);
object.put(getResources().getString(R.string.auditstatus), "In Progress");
object.put(getResources().getString(R.string.fromdate), fromDate);
object.put(getResources().getString(R.string.todate), thisDate);
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.content.Context;
import android.content.Intent;
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
/*
Create by Ramesh Babu
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -20,11 +19,13 @@ public class PlanDetailsAdapter extends RecyclerView.Adapter<PlanDetailsAdapter.
private Context context;
private ArrayList<Plans> arrayList;
PreferenceManager preferenceManager;
public PlanDetailsAdapter(Context context, ArrayList<Plans> storesArrayList){
this.context = context;
this.arrayList = storesArrayList;
preferenceManager = new PreferenceManager(context);
}
@NonNull
@Override
public PlanDetailsAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType){
......@@ -33,18 +34,13 @@ public class PlanDetailsAdapter extends RecyclerView.Adapter<PlanDetailsAdapter.
PlanDetailsAdapter.ViewHolder viewHolder = new PlanDetailsAdapter.ViewHolder(listItem);
return viewHolder;
}
@Override
public void onBindViewHolder(@NonNull PlanDetailsAdapter.ViewHolder holder, final int position){
final Plans items = arrayList.get(position);
holder.plandetails_barcode.setText(items.getBarcode());
holder.plandetails_qty .setText(items.getQty());
/*if(preferenceManager.getUserId().equalsIgnoreCase("20009") || preferenceManager.getUserId().equalsIgnoreCase("8057")){
holder.plandetails_delete.setVisibility(View.VISIBLE);
}else{
holder.plandetails_delete.setVisibility(View.INVISIBLE);
}*/
Log.e("PlanDetails", items.getPlanId());
holder.plandetails_delete .setOnClickListener(view -> {
holder.planDetails_barcode . setText(items.getBarcode());
holder.planDetails_qty . setText(items.getQty());
holder.planDetails_delete . setOnClickListener(view -> {
try{
if(Constants.isNetworkAvailable(context)){
((PlanDetails) context).DeleteBarcode(items,position);
......@@ -56,18 +52,20 @@ public class PlanDetailsAdapter extends RecyclerView.Adapter<PlanDetailsAdapter.
}
});
}
@Override
public int getItemCount(){
return arrayList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder{
public TextView plandetails_barcode, plandetails_qty;
ImageView plandetails_delete;
public TextView planDetails_barcode, planDetails_qty;
ImageView planDetails_delete;
public ViewHolder(View itemView){
super(itemView);
plandetails_barcode = itemView.findViewById(R.id.plandetails_barcode);
plandetails_qty = itemView.findViewById(R.id.plandetails_qty);
plandetails_delete = itemView.findViewById(R.id.plandetails_delete);
planDetails_barcode = itemView.findViewById(R.id.plandetails_barcode);
planDetails_qty = itemView.findViewById(R.id.plandetails_qty);
planDetails_delete = itemView.findViewById(R.id.plandetails_delete);
}
}
}
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.Comparator;
/*
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.app.Activity;
import android.content.Context;
......@@ -31,49 +31,90 @@ public class PreferenceManager {
public PreferenceManager(Context context){
_sharedPrefs = context.getSharedPreferences(APP_SHARED_PREFS, Activity.MODE_PRIVATE);
_prefsEditor = _sharedPrefs.edit();
// --Commented out by Inspection START (9/25/2023 10:39 AM):
// public static PreferenceManager getInstance(){
// return (PreferenceManager) _sharedPrefs;
// }
// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
//// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// public void delete(){
//// --Commented out by Inspection START (9/25/2023 10:39 AM):
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
//// _prefsEditor.remove(KEY_USER_ID);
// --Commented out by Inspection START (9/25/2023 10:39 AM):
////// _prefsEditor.apply();
////// }
// --Commented out by Inspection START (9/25/2023 10:39 AM):
//////// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
////// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
//// public void setKeyUserLogin(String userLogin){
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
//_prefsEditor.putString(KEY_USER_LOGIN,userLogin);
//_prefsEditor.apply();
}
public static PreferenceManager getInstance(){
return (PreferenceManager) _sharedPrefs;
}
public void delete(){
_prefsEditor.remove(KEY_USER_ID);
_prefsEditor.apply();
}
public void setKeyUserLogin(String userLogin){
_prefsEditor.putString(KEY_USER_LOGIN,userLogin);
_prefsEditor.apply();
}
public String getKeyUserLogin(){
// --Commented out by Inspection START (9/25/2023 10:39 AM):
// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// return _sharedPrefs.getString(KEY_USER_LOGIN,"");
//// }
////// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
// public void setFirstName(String firstName){
// _prefsEditor.putString(FIRST_NAME,firstName);
// _prefsEditor.apply();
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
return _sharedPrefs.getString(KEY_USER_LOGIN,"");
}
public void setFirstName(String firstName){
_prefsEditor.putString(FIRST_NAME,firstName);
_prefsEditor.apply();
}
public String getFirstName(){
return _sharedPrefs.getString(FIRST_NAME,"");
}
public void setModule(String Mod){
_prefsEditor.putString(MODULE,Mod);
public void setModule(String Mod) {
_prefsEditor.putString(MODULE, Mod);
_prefsEditor.apply();
}
public String getModule(){
// --Commented out by Inspection START (9/25/2023 10:39 AM):
// _prefsEditor.putString(MODULE,Mod);
// _prefsEditor.apply();
// }
// public String getModule(){
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
return _sharedPrefs.getString(MODULE,"");
} public void setBLUETOOTH(String Mod){
_prefsEditor.putString(BLUETOOTH,Mod);
_prefsEditor.apply();
// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// } public void setBLUETOOTH(String Mod){
// --Commented out by Inspection START (9/25/2023 10:39 AM):
////// _prefsEditor.putString(BLUETOOTH,Mod);
//// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
//// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
//_prefsEditor.apply();
}
public String getBLUETOOTH(){
return _sharedPrefs.getString(BLUETOOTH,"");
}
public void setLastName(String lastName){
_prefsEditor.putString(LAST_NAME,lastName);
_prefsEditor.apply();
}
public String getLastName(){
return _sharedPrefs.getString(LAST_NAME,"");
// --Commented out by Inspection START (9/25/2023 10:39 AM):
// _prefsEditor.putString(LAST_NAME,lastName);
// _prefsEditor.apply();
// }
// public String getLastName(){
// return _sharedPrefs.getString(LAST_NAME,"");
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
}
public void setStoreId(String quoteId){
_prefsEditor.putString(STORE_ID,quoteId);
......@@ -82,13 +123,22 @@ public class PreferenceManager {
public String getStoreId(){
return _sharedPrefs.getString(STORE_ID,"");
}
public void setPrefix(String prefix){
_prefsEditor.putString(PREFIX,prefix);
public void setPrefix(String prefix) {
_prefsEditor.putString(PREFIX, prefix);
_prefsEditor.apply();
}
public String getPrefix(){
return _sharedPrefs.getString(PREFIX,"");
}
// --Commented out by Inspection START (9/25/2023 10:39 AM):
// _prefsEditor.apply();
// }
// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// public String getPrefix(){
////// --Commented out by Inspection START (9/25/2023 10:39 AM):
//// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
// return _sharedPrefs.getString(PREFIX,"");
// }
// public void setCustToken(String token){
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
public void setCustToken(String token){
_prefsEditor.putString(CUST_TOKEN,token);
_prefsEditor.apply();
......@@ -97,11 +147,13 @@ public class PreferenceManager {
return _sharedPrefs.getString(CUST_TOKEN,"");
}
public void setID(String id){
_prefsEditor.putString(ID, id);
_prefsEditor.apply();
}
public String getID(){
return _sharedPrefs.getString(ID, "");
// --Commented out by Inspection START (9/25/2023 10:39 AM):
// _prefsEditor.putString(ID, id);
// _prefsEditor.apply();
// }
// public String getID(){
// return _sharedPrefs.getString(ID, "");
// --Commented out by Inspection STOP (9/25/2023 10:39 AM)
}
public void setEmail(String email){
_prefsEditor.putString(KEY_EMAIL, email);
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
/*
Create by Ramesh Babu
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.content.Context;
import android.text.Html;
......@@ -22,9 +22,10 @@ public class RackWiseAdapter extends RecyclerView.Adapter<RackWiseAdapter.ViewHo
this.context = context;
this.arrayList = storesArrayList;
}
@NonNull
@Override
public RackWiseAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
public RackWiseAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType){
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View listItem = layoutInflater.inflate(R.layout.rackwise_item, parent, false);
RackWiseAdapter.ViewHolder viewHolder = new RackWiseAdapter.ViewHolder(listItem);
......@@ -32,27 +33,39 @@ public class RackWiseAdapter extends RecyclerView.Adapter<RackWiseAdapter.ViewHo
}
@Override
public void onBindViewHolder(@NonNull RackWiseAdapter.ViewHolder holder, final int position) {
public void onBindViewHolder(@NonNull RackWiseAdapter.ViewHolder holder, final int position){
final RackWise items = arrayList.get(position);
if( items.getId() == 0 ){
holder.rack_id.setText("");
}else{
holder.rack_id.setText(Html.fromHtml(Constants.Id + items.getId()));
if(items.getId() == 0) {
holder.rack_id.setText ("");
}else {
holder.rack_id.setText (Html.fromHtml(Constants.Id + items.getId()));
}
if(items.getScanned_by().equalsIgnoreCase("null")){
holder.rack_UserId.setText(Html.fromHtml(Constants.User +"0"));
}else{
holder.rack_UserId.setText(Html.fromHtml(Constants.User + items.getScanned_by()));
}
if(items.getScanning_start_at().equalsIgnoreCase("null")){
holder.rack_from.setText(Html.fromHtml(Constants.From + "0:00"));
}else {
holder.rack_from.setText(Html.fromHtml(Constants.From + items.getScanning_start_at()));
}
if(items.getScanning_end_at().equalsIgnoreCase("null")){
holder.rack_to.setText(Html.fromHtml(Constants.To+"0:00"));
}else {
holder.rack_to.setText(Html.fromHtml(Constants.To + items.getScanning_end_at()));
holder.rack_qty.setText(String.valueOf(items.getQty()));
}
holder.rack_qty.setText (String.valueOf(items.getQty()));
}
@Override
public int getItemCount() {
public int getItemCount(){
return arrayList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
public class ViewHolder extends RecyclerView.ViewHolder{
public TextView rack_id,rack_qty,rack_UserId,rack_from,rack_to;
public ViewHolder(View itemView) {
public ViewHolder(View itemView){
super(itemView);
rack_id = itemView.findViewById(R.id.rack_id);
rack_qty = itemView.findViewById(R.id.rack_qty);
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.os.Build;
import android.os.Bundle;
......@@ -12,7 +12,6 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
......@@ -32,14 +31,14 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import static w.soulofpluto.posstockaudit.Constants.JSON;
import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
import static w.soulofpluto.posstockauditrecieving.Constants.JSON;
import static w.soulofpluto.posstockauditrecieving.Constants.getDateWithOffset;
/*
Create by Ramesh Babu P
*/
public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItemSelectedListener {
public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItemSelectedListener {
PreferenceManager preferenceManager;
ArrayList<Plans> arrayList;
TextView total_scanned;
......@@ -90,8 +89,6 @@ public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItem
Date from = getDateWithOffset(-Constants.Value, new Date());
String fromDate = currentDate.format(from);
String thisDate = currentDate.format(todayDate);
//Log.e("Last date" ,fromDate);
//Log.e("Today date",thisDate);
object.put(getResources().getString(R.string.auditstatus),"In Progress");
object.put(getResources().getString(R.string.fromdate), fromDate);
object.put(getResources().getString(R.string.todate), thisDate);
......@@ -99,7 +96,6 @@ public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItem
}catch(JSONException e){
e.printStackTrace();
}
Log.e("Rackwise object ====>",object.toString());
RequestBody body = RequestBody.create(JSON,object.toString());
final OkHttpClient client = new OkHttpClient();
client.setConnectTimeout(250, TimeUnit.SECONDS);
......@@ -126,7 +122,7 @@ public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItem
Constants.ProgressDialogDismiss();
final String Response = response.body().string();
Handler handler = new Handler(Looper.getMainLooper());
Log.e("Store Response " , Response);
//Log.e("Store Response " , Response);
handler.post(() -> {
try{
if(response.code() == 200){
......@@ -187,6 +183,7 @@ public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItem
}
});
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l){
switch (adapterView.getId()){
......@@ -215,9 +212,11 @@ public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItem
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
private void getRackWiseData(String planId){
JSONObject object = new JSONObject();
try{
......@@ -266,7 +265,6 @@ public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItem
rackWiseArrayList.clear();
JSONObject headerObject = object1.getJSONObject(getResources().getString(R.string.data));
final int count = headerObject.getInt("total_scanned_items");
//Log.e("TOTAL SCANNED ITEMS : ",String.valueOf(count));
runOnUiThread(() -> total_scanned.setText(Html.fromHtml(Constants.getVal(count))));
JSONArray jsonArray = headerObject.getJSONArray("rack_info");
for(int i = 0; i < jsonArray.length(); i++){
......@@ -277,7 +275,7 @@ public class RackWiseQty extends AppCompatActivity implements AdapterView.OnItem
}else {
rackWise.setId(Integer.parseInt(jsonObject.getString("rack_id")));
}
rackWise.setScanned_by(String.valueOf(jsonObject.getInt("scanned_by")));
rackWise.setScanned_by(jsonObject.getString("scanned_by"));
rackWise.setScanning_start_at(jsonObject.getString("scanning_start_at"));
rackWise.setScanning_end_at(jsonObject.getString("scanning_end_at"));
rackWise.setQty(Integer.parseInt(jsonObject.getString("scanned_items_count")));
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.os.Build;
import android.os.Bundle;
......@@ -32,30 +32,31 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import static w.soulofpluto.posstockaudit.Constants.JSON;
import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
import static w.soulofpluto.posstockauditrecieving.Constants.JSON;
import static w.soulofpluto.posstockauditrecieving.Constants.getDateWithOffset;
/*
Create by Ramesh Babu
*/
public class SearchByBarcode extends AppCompatActivity implements AdapterView.OnItemSelectedListener {
Toolbar searchbybarcode_toolbar;
Spinner searchbybarcode_spinner;
EditText searchby_barcode;
TextView searchbybarcode_rack;
Toolbar searchByBarcode_toolbar;
Spinner searchByBarcode_spinner;
EditText searchBy_barcode;
TextView searchByBarcode_rack;
ArrayList<Plans> arrayList;
PreferenceManager preferenceManager;
String planid;
String planId;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_searchbybarcode);
searchbybarcode_toolbar = findViewById(R.id.searchbybarcode_toolbar);
searchbybarcode_spinner = findViewById(R.id.searchbybarcode_spinner);
searchbybarcode_rack = findViewById(R.id.searchbybarcode_rack);
searchby_barcode = findViewById(R.id.searchbybarcode_edit);
searchByBarcode_toolbar = findViewById(R.id.searchbybarcode_toolbar);
searchByBarcode_spinner = findViewById(R.id.searchbybarcode_spinner);
searchByBarcode_rack = findViewById(R.id.searchbybarcode_rack);
searchBy_barcode = findViewById(R.id.searchbybarcode_edit);
preferenceManager = new PreferenceManager(this);
setSupportActionBar(searchbybarcode_toolbar);
setSupportActionBar(searchByBarcode_toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("Barcode Search");
if(Constants.isNetworkAvailable(this)){
......@@ -64,8 +65,8 @@ import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
}else{
Constants.getToast(SearchByBarcode.this,getResources().getString(R.string.connection));
}
searchbybarcode_spinner.setOnItemSelectedListener(this);
searchby_barcode.addTextChangedListener(new Checked());
searchByBarcode_spinner.setOnItemSelectedListener(this);
searchBy_barcode.addTextChangedListener(new Checked());
}
@Override
......@@ -126,14 +127,14 @@ import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
Log.e("Length",String.valueOf(getResources().getString(R.string.data).length()));
if(object1.has(getResources().getString(R.string.data))){
if(object1.getString(getResources().getString(R.string.msg)).equalsIgnoreCase("no data found")){
searchby_barcode.setText("");
searchbybarcode_rack.setText(object1.getString(getResources().getString(R.string.msg)));
searchBy_barcode.setText("");
searchByBarcode_rack.setText(object1.getString(getResources().getString(R.string.msg)));
//Constants.getToast(SearchByBarcode.this, object.getString(getResources().getString(R.string.msg)));
}else{
searchby_barcode.setText("");
searchBy_barcode.setText("");
try{
JSONObject jsonObject = object1.getJSONObject(getResources().getString(R.string.data));
searchbybarcode_rack.setText(Html.fromHtml(Constants.Id) + jsonObject.getString("rack_id") + "\n"
searchByBarcode_rack.setText(Html.fromHtml(Constants.Id) + jsonObject.getString("rack_id") + "\n"
+ (Html.fromHtml(Constants.Barcode) + jsonObject.getString("barcode")) + "\n"
+ (Html.fromHtml(Constants.From) + jsonObject.getString("scanning_start_at")) + "\n"
+ (Html.fromHtml(Constants.To) + jsonObject.getString("scanning_end_at")));
......@@ -183,17 +184,17 @@ import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
try{
if(Constants.isNetworkAvailable(SearchByBarcode.this)) {
if(val.toString().length() > 0) {
if(planid.equalsIgnoreCase("0")) {
if(planId.equalsIgnoreCase("0")) {
Constants.getToast(SearchByBarcode.this, "Choose Plan Id");
searchby_barcode.setText("");
searchBy_barcode.setText("");
}
if (val.toString().contains("\n")) {
if (Constants.isNetworkAvailable(SearchByBarcode.this)) {
if (planid.equalsIgnoreCase("0")) {
if (planId.equalsIgnoreCase("0")) {
Constants.getToast(SearchByBarcode.this, "Choose Plan Id");
searchby_barcode.setText("");
searchBy_barcode.setText("");
} else {
getBarcodeCheck(planid, searchby_barcode.getText().toString().replace("\n", ""));
getBarcodeCheck(planId, searchBy_barcode.getText().toString().replace("\n", ""));
Constants.ProgressDialogShow(SearchByBarcode.this);
}
} else {
......@@ -224,8 +225,8 @@ import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
String thisDate = currentDate.format(todayDate);
Log.e("Last date",fromDate);
object.put(getResources().getString(R.string.auditstatus),"In Progress");
object.put(getResources().getString(R.string.fromdate),fromDate);
object.put(getResources().getString(R.string.todate),thisDate);
object.put(getResources().getString(R.string.fromdate), fromDate);
object.put(getResources().getString(R.string.todate), thisDate);
}
}catch(JSONException e){
e.printStackTrace();
......@@ -246,12 +247,9 @@ import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
client.newCall(request).enqueue(new Callback(){
@Override
public void onFailure(Request request, final IOException e){
runOnUiThread(new Runnable(){
@Override
public void run(){
runOnUiThread(() -> {
Constants.getToast(SearchByBarcode.this,e.getMessage());
Constants.ProgressDialogDismiss();
}
});
}
@Override
......@@ -283,7 +281,7 @@ import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
arrayList.add(plans);
}
ArrayAdapter<Plans> adapter = new ArrayAdapter<Plans>(SearchByBarcode.this, android.R.layout.simple_dropdown_item_1line, arrayList);
searchbybarcode_spinner.setAdapter(adapter);
searchByBarcode_spinner.setAdapter(adapter);
}else if (object1.has(getResources().getString(R.string.msg))){
runOnUiThread(() -> {
try{
......@@ -327,17 +325,18 @@ import static w.soulofpluto.posstockaudit.Constants.getDateWithOffset;
switch (adapterView.getId()){
case R.id.searchbybarcode_spinner:
Plans plan = arrayList.get(i);
planid = plan.PlanId;
Log.e("Search by barcode ===>",planid);
if(planid.equalsIgnoreCase("0")){
planId = plan.PlanId;
Log.e("Search by barcode ===>",planId);
if(planId.equalsIgnoreCase("0")){
//Constants.getToast(RackWiseQty.this,"Please Choose PlanId");
searchbybarcode_rack.setText("");
searchByBarcode_rack.setText("");
}else{
searchbybarcode_rack.setText("");
searchByBarcode_rack.setText("");
}
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
......@@ -16,12 +15,10 @@ import com.google.firebase.crashlytics.FirebaseCrashlytics;
public class SplashActivity extends AppCompatActivity{
PreferenceManager preferenceManager;
//BluetoothAdapter bluetoothAdapter;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState){
setContentView(R.layout.activity_splash);
preferenceManager = new PreferenceManager(this);
//bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
FirebaseApp.initializeApp(this);
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
runOnUiThread(() -> splashMethod());
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
/*
/*
Create by Ramesh Babu
*/
public class Store {
public class Store {
int StoreId;
String StoreName;
......@@ -27,5 +27,4 @@ public class Store {
public String toString() {
return StoreName;
}
}
}
......@@ -26,7 +26,7 @@
</androidx.appcompat.widget.Toolbar>
<!-- <EditText
<!--<EditText
android:layout_below="@+id/main_toolbar"
android:id="@+id/barcode"
android:layout_width="match_parent"
......@@ -39,7 +39,6 @@
android:layout_below="@+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/plans_List"
/>
android:id="@+id/plans_List"/>
</RelativeLayout>
\ No newline at end of file
......@@ -52,7 +52,13 @@
android:text="QTY"
style="@style/textfont"
android:textColor="@color/colorPrimaryDark"
android:gravity="center"/>
android:gravity="right"
android:layout_marginRight="10dp"/>
<!--<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.1"/>-->
</LinearLayout>
......
......@@ -56,7 +56,9 @@
android:layout_margin="5dp"
style="@style/textfont"
android:layout_weight="0.3"
android:gravity="right"
android:layout_gravity="center"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
<resources>
<string name="app_name">Pos Stock Audit</string>
<string name="app_name">Pos Stock Receive And Transfer </string>
<string name="success" translatable="false">success</string>
<string name="msg" translatable="false">msg</string>
<string name="data" translatable="false">data</string>
......@@ -159,6 +159,7 @@
<string name="lang_thai">THAI</string>
<string name="lang_southasia">SOUTH ASIA</string>
<string name="action_settings">Settings</string>
<string name="handlingmsg_warn_receipt_near_end">Roll paper is nearly end.\n</string>
<string name="handlingmsg_warn_battery_near_end">Battery level of printer is low.\n</string>
<string name="handlingmsg_err_no_response">Please check the connection of the printer and the mobile terminal.\nConnection get lost.\n</string>
......@@ -175,4 +176,5 @@
<string name="handlingmsg_err_wrong_paper">Please set correct roll paper.\n</string>
<string name="handlingmsg_err_battery_real_end">Please connect AC adapter or change the battery.\nBattery of printer is almost empty.\n</string>
<string name="handlingmsg_err_offline">Printer is offline.\n</string>
</resources>
\ No newline at end of file
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import org.junit.Test;
......
......@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
// NOTE: Do not place your application dependencies here; they belong
......
#Wed Jan 27 12:34:28 IST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
......@@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
......@@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
......@@ -45,28 +64,14 @@ echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment