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;
......@@ -29,8 +29,9 @@ public class Constants{
//public static String BASE_URL = "https://49588a.emporter.eu/";
//public static String BASE_URL = "https://30ad04.emporter.eu/";
//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://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
/*
Create by Ramesh Babu
*/
import android.app.Dialog;
......@@ -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,29 +54,30 @@ 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())){
Constants.getToast(context,"Please Enter Rack No");
}else{
if(holder.rack_no.getText().toString().length()<= 3) {
if (TextUtils.isEmpty(holder.rack_no.getText().toString())) {
Constants.getToast(context,"Please Enter Rack No");
} else {
if (holder.rack_no.getText().toString().length()<= 4) {
PlanDetails.start(context, items, holder.rack_no.getText().toString());
}else{
Constants.getToast(context,"Enter Valid Rack No");
holder.rack_no.setText("");
holder.rack_no.requestFocus();
}
} else {
Constants.getToast(context,"Enter Valid Rack No");
holder.rack_no.setText("");
holder.rack_no.requestFocus();
}
}
});
}
}
@Override
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,38 +19,37 @@ 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
/*
Create by Ramesh Babu
*/
public class DashBoardActivity extends AppCompatActivity implements View.OnClickListener {
Toolbar dashboard_toolbar;
Button stock_audit, rack_qty, searchBy_Barcode, transfer;
TextView version;
Toolbar dashboard_toolbar;
Button stock_audit, rack_qty, searchBy_Barcode, transfer;
TextView version;
PreferenceManager preferenceManager;
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);
stock_audit = findViewById(R.id.stock_audit);
rack_qty = findViewById(R.id.rack_qty);
searchBy_Barcode = findViewById(R.id.searchby_barcode);
dashboard_toolbar = findViewById(R.id.dashboard_toolbar);
version = findViewById(R.id.version);
transfer = findViewById(R.id.transfer);
preferenceManager = new PreferenceManager(this);
stock_audit = findViewById(R.id.stock_audit);
rack_qty = findViewById(R.id.rack_qty);
searchBy_Barcode = findViewById(R.id.searchby_barcode);
dashboard_toolbar = findViewById(R.id.dashboard_toolbar);
version = findViewById(R.id.version);
transfer = findViewById(R.id.transfer);
preferenceManager = new PreferenceManager(this);
setSupportActionBar(dashboard_toolbar);
getSupportActionBar().setTitle(getResources().getString(R.string.dashboard));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
stock_audit .setOnClickListener(this);
rack_qty .setOnClickListener(this);
searchBy_Barcode.setOnClickListener(this);
transfer .setOnClickListener(this);
version .setText(Html.fromHtml(Constants.Ver_Text +Constants.VERSION));
stock_audit .setOnClickListener(this);
rack_qty .setOnClickListener(this);
searchBy_Barcode .setOnClickListener(this);
transfer .setOnClickListener(this);
version .setText(Html.fromHtml(Constants.Ver_Text +Constants.VERSION));
}
@Override
......@@ -62,18 +60,18 @@ public class DashBoardActivity extends AppCompatActivity implements View.OnClick
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item){
switch(item.getItemId()){
case R.id.dashboard_logout:
if(Constants.isNetworkAvailable(DashBoardActivity.this)){
Logout(Constants.Logout+preferenceManager.getUserId());
Constants.ProgressDialogShow(DashBoardActivity.this);
}else{
Constants.getToast(DashBoardActivity.this,getResources().getString(R.string.connection));
}
break;
case android.R.id.home:
finish();
break;
switch(item.getItemId()){
case R.id.dashboard_logout:
if(Constants.isNetworkAvailable(DashBoardActivity.this)){
Logout(Constants.Logout+preferenceManager.getUserId());
Constants.ProgressDialogShow(DashBoardActivity.this);
}else{
Constants.getToast(DashBoardActivity.this,getResources().getString(R.string.connection));
}
break;
case android.R.id.home:
finish();
break;
}
return super.onOptionsItemSelected(item);
}
......@@ -83,14 +81,14 @@ public class DashBoardActivity extends AppCompatActivity implements View.OnClick
client.setConnectTimeout(240, TimeUnit.SECONDS);
client.setReadTimeout(240,TimeUnit.SECONDS);
client.setWriteTimeout(240,TimeUnit.SECONDS);
final Request request = new Request.Builder()
final Request request = new Request.Builder()
.url(Url)
.get()
.addHeader("Content-Type", "application/json")
.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
......@@ -100,18 +98,18 @@ public class DashBoardActivity extends AppCompatActivity implements View.OnClick
String res = response.body().string();
Log.e("Dashboard Logout ", res);
try{
JSONObject jsonObject = new JSONObject(res);
if(jsonObject.has("success")){
if(jsonObject.getInt("success") == 1){
preferenceManager.setUserId("");
preferenceManager.setLogged(false);
preferenceManager.setCustToken("");
preferenceManager.setStoreId("");
Login.Logout(DashBoardActivity.this);
}else{
Constants.getToast(DashBoardActivity.this,jsonObject.getString("msg"));
}
}
JSONObject jsonObject = new JSONObject(res);
if(jsonObject.has("success")){
if(jsonObject.getInt("success") == 1){
preferenceManager.setUserId("");
preferenceManager.setLogged(false);
preferenceManager.setCustToken("");
preferenceManager.setStoreId("");
Login.Logout(DashBoardActivity.this);
}else{
Constants.getToast(DashBoardActivity.this,jsonObject.getString("msg"));
}
}
}catch(JSONException e){
e.printStackTrace();
}catch (NullPointerException np){
......@@ -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
/*
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);
......@@ -73,9 +71,9 @@ public class Login extends AppCompatActivity implements View.OnClickListener, Ad
}else{
if(Constants.isNetworkAvailable(Login.this)){
if(userId.getText().toString().length() > 3){
StoreId(userId.getText().toString());
Constants.ProgressDialogShow(Login.this);
}
StoreId(userId.getText().toString());
Constants.ProgressDialogShow(Login.this);
}
}else{
Constants.getToast(Login.this, getResources().getString(R.string.connection));
}
......@@ -94,8 +92,8 @@ public class Login extends AppCompatActivity implements View.OnClickListener, Ad
@Override
public void onFailure(Request request, final IOException e){
runOnUiThread(() -> {
Toast.makeText(Login.this, e.getMessage(), Toast.LENGTH_SHORT).show();
Constants.ProgressDialogDismiss();
Toast.makeText(Login.this, e.getMessage(), Toast.LENGTH_SHORT).show();
Constants.ProgressDialogDismiss();
});
}
@Override
......@@ -108,20 +106,20 @@ public class Login extends AppCompatActivity implements View.OnClickListener, Ad
handler.post(() -> {
try{
if(response.code() == 200){
JSONObject object = new JSONObject(Response);
stores = new ArrayList<>();
JSONObject object = new JSONObject(Response);
stores = new ArrayList<>();
if(object.has(getResources().getString(R.string.success))){
if(object.getInt(getResources().getString(R.string.success)) == 1){
if(object.has(getResources().getString(R.string.data))){
JSONArray jsonArray = object.getJSONArray(getResources().getString(R.string.data));
if(jsonArray.length() > 0){
for(int i = 0; i < jsonArray.length(); i++){
JSONObject jsonObject = jsonArray.getJSONObject(i);
Store store = new Store();
store.setStoreId(jsonObject.getInt(getResources().getString(R.string.id)));
store.setStoreName(jsonObject.getString(getResources().getString(R.string.store_name)));
stores.add(store);
}
if(object.getInt(getResources().getString(R.string.success)) == 1){
if(object.has(getResources().getString(R.string.data))){
JSONArray jsonArray = object.getJSONArray(getResources().getString(R.string.data));
if(jsonArray.length() > 0){
for(int i = 0; i < jsonArray.length(); i++){
JSONObject jsonObject = jsonArray.getJSONObject(i);
Store store = new Store();
store.setStoreId(jsonObject.getInt(getResources().getString(R.string.id)));
store.setStoreName(jsonObject.getString(getResources().getString(R.string.store_name)));
stores.add(store);
}
ArrayAdapter<Store> adapter = new ArrayAdapter<>(Login.this, R.layout.spinner_item, stores);
storeId.setAdapter(adapter);
}
......@@ -199,9 +197,9 @@ public class Login extends AppCompatActivity implements View.OnClickListener, Ad
Constants.ProgressDialogDismiss();
if(e.getCause() != null && e.getCause() instanceof UnknownHostException){
}else{
runOnUiThread(() -> Constants.getToast(Login.this,e.getMessage()));
runOnUiThread(() -> Constants.getToast(Login.this,e.getMessage()));
}
}//7842734567
}
@Override
public void onResponse(final Response response) throws IOException{
Constants.ProgressDialogDismiss();
......@@ -240,9 +238,9 @@ public class Login extends AppCompatActivity implements View.OnClickListener, Ad
});
}catch(NullPointerException io){
io.printStackTrace();
}finally{
}finally{
response.body().close();
}
}
}
});
}
......
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,41 +34,38 @@ 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 -> {
try{
if(Constants.isNetworkAvailable(context)){
((PlanDetails) context).DeleteBarcode(items,position);
}else{
((Activity)context).runOnUiThread(() -> Constants.getToast(context,context.getResources().getString(R.string.connection)));
}
}catch(NullPointerException np){
np.printStackTrace();
}
final Plans items = arrayList.get(position);
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);
}else{
((Activity)context).runOnUiThread(() -> Constants.getToast(context,context.getResources().getString(R.string.connection)));
}
}catch(NullPointerException np){
np.printStackTrace();
}
});
}
@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,14 +123,23 @@ 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,"");
}
public void setCustToken(String token){
// --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
......@@ -8,8 +8,8 @@ package w.soulofpluto.posstockaudit;
import java.util.Comparator;
public class RackWise {
int id;
int Qty;
int id;
int Qty;
String scanned_by;
String scanning_start_at;
String scanning_end_at;
......
package w.soulofpluto.posstockaudit;
package w.soulofpluto.posstockauditrecieving;
import android.content.Context;
import android.text.Html;
......@@ -22,44 +22,57 @@ 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) {
LayoutInflater layoutInflater = LayoutInflater.from(parent.getContext());
View listItem = layoutInflater.inflate(R.layout.rackwise_item, parent, false);
RackWiseAdapter.ViewHolder viewHolder = new RackWiseAdapter.ViewHolder(listItem);
return viewHolder;
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);
return viewHolder;
}
@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("");
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_id.setText(Html.fromHtml(Constants.Id + items.getId()));
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()));
}
holder.rack_UserId.setText(Html.fromHtml(Constants.User + items.getScanned_by()));
holder.rack_from.setText(Html.fromHtml(Constants.From + items.getScanning_start_at()));
holder.rack_to.setText(Html.fromHtml(Constants.To + items.getScanning_end_at()));
holder.rack_qty.setText(String.valueOf(items.getQty()));
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()));
}
@Override
public int getItemCount() {
return arrayList.size();
public int getItemCount(){
return arrayList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
public TextView rack_id,rack_qty,rack_UserId,rack_from,rack_to;
public ViewHolder(View itemView) {
super(itemView);
rack_id = itemView.findViewById(R.id.rack_id);
rack_qty = itemView.findViewById(R.id.rack_qty);
rack_UserId = itemView.findViewById(R.id.rack_userid);
rack_from = itemView.findViewById(R.id.rack_from);
rack_to = itemView.findViewById(R.id.rack_to);
}
public class ViewHolder extends RecyclerView.ViewHolder{
public TextView rack_id,rack_qty,rack_UserId,rack_from,rack_to;
public ViewHolder(View itemView){
super(itemView);
rack_id = itemView.findViewById(R.id.rack_id);
rack_qty = itemView.findViewById(R.id.rack_qty);
rack_UserId = itemView.findViewById(R.id.rack_userid);
rack_from = itemView.findViewById(R.id.rack_from);
rack_to = itemView.findViewById(R.id.rack_to);
}
}
}
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());
......@@ -31,13 +28,13 @@ public class SplashActivity extends AppCompatActivity{
public void splashMethod(){
Handler handler = new Handler();
Runnable runnable = () -> {
if(preferenceManager.isLogged()){
startActivity(new Intent(SplashActivity.this, HomeActivity.class));
finish();
}else{
startActivity(new Intent(SplashActivity.this, Login.class));
finish();
}
if(preferenceManager.isLogged()){
startActivity(new Intent(SplashActivity.this, HomeActivity.class));
finish();
}else{
startActivity(new Intent(SplashActivity.this, Login.class));
finish();
}
};
handler.postDelayed(runnable, 2500);
}
......
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