Compare commits

...

42 Commits

Author SHA1 Message Date
Matéo Duparc 2766000ebc
libpdfviewer: update to PdfViewer 15 2022-10-06 18:22:57 +02:00
Daniel Micay 9e40a05be3 make manifest whitespace style consistent 2022-09-30 17:26:30 -04:00
Pratyush 18761b3e4a replace deprecated api uses 2022-09-30 17:25:49 -04:00
Pratyush 43f971c028 add documentLaunchMode flag 2022-09-30 17:25:49 -04:00
Pratyush 2b81d4dcc3 fix navigation bar color on three button navigation system 2022-09-30 17:25:49 -04:00
Pratyush 5a55c8045b use color transparent for status bar 2022-09-30 17:25:49 -04:00
Pratyush 718b448cc5 remove hardcoded (toolbar) background color 2022-09-30 17:25:49 -04:00
Pratyush afaf71a4a2 use DynamicColors app bar theme 2022-09-30 17:25:49 -04:00
Pratyush 8a308b69e5 apply DynamicColors when available 2022-09-30 17:25:47 -04:00
dependabot[bot] ea5c34ed52 Bump kotlin-gradle-plugin from 1.7.10 to 1.7.20
Bumps [kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.7.10 to 1.7.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.7.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.10...v1.7.20)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-29 19:23:32 -04:00
Daniel Micay fee1b1516f move away from deprecated package attribute 2022-09-15 19:53:32 -04:00
dependabot[bot] bc77ecbcc6 Bump gradle from 7.2.2 to 7.3.0
Bumps gradle from 7.2.2 to 7.3.0.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-15 19:44:05 -04:00
Daniel Micay 955bed3614 increment version to 15 2022-09-12 22:29:25 -04:00
Daniel Micay ee3605428e minor cleanup 2022-09-12 22:27:03 -04:00
Daniel Micay e967af2397 update pdf.js to v2.16.105 2022-09-12 22:23:42 -04:00
Daniel Micay 9ea5cb1802 remove duplicate icon resource 2022-09-12 22:17:44 -04:00
Daniel Micay a307f2892c add missing newlines 2022-09-12 22:16:21 -04:00
Pratyush 8c795d4552 add android 13 monochrome icon 2022-09-12 22:15:32 -04:00
Daniel Micay d7ca71770f remove unused string resource 2022-09-12 22:06:02 -04:00
Daniel Micay a29ec202a7 update appcompat to 1.5.1 2022-09-12 21:21:26 -04:00
Pratyush ea9a57fabe Improve password UI/UX 2022-09-12 02:15:53 -04:00
Pratyush 68fc48d3a9 add on (doc) loaded callback 2022-09-12 02:08:42 -04:00
quh4gko8 3ebdfd0a11 bump targetSdk to 33 2022-09-10 22:44:02 -04:00
quh4gko8 ff11df007f Build against android 13, resolve new deprecated APIs 2022-09-10 22:44:02 -04:00
Daniel Micay fa2db54804 update pdf.js to v2.15.349 2022-08-25 23:08:53 -04:00
Patryk Mis 7634c00f59 Bump dependencies 2022-08-11 14:39:32 -04:00
Daniel Micay f67021e975 update Gradle to 7.5.1 2022-08-06 10:57:35 -04:00
dependabot[bot] adb87cbaef Bump gradle from 7.2.1 to 7.2.2
Bumps gradle from 7.2.1 to 7.2.2.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-03 22:15:55 -04:00
Daniel Micay 09ccfb069d update Android build tools to 33.0.0 2022-07-16 18:29:19 -04:00
Daniel Micay 2a91d95eef update Gradle to 7.5 2022-07-16 17:48:38 -04:00
dependabot[bot] a48213c450 Bump kotlin-gradle-plugin from 1.7.0 to 1.7.10
Bumps [kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.7.0 to 1.7.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 17:39:35 -04:00
dependabot[bot] 2f4c1ebfed Bump kotlin-gradle-plugin from 1.6.21 to 1.7.0
Bumps [kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.6.21 to 1.7.0.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-08 17:12:29 -04:00
Daniel Micay 22b400c68f work around dependabot gradle bug 2022-06-06 06:42:49 -04:00
Daniel Micay 6a6a263b0b update AndroidX appcompat library to 1.4.2 2022-06-04 11:02:25 -04:00
Daniel Micay 8cd685c8c7 remove obsolete backup lint suppression 2022-05-26 20:45:37 -04:00
Daniel Micay be3f43e7a4 ignore vector path length lint for Material icons 2022-05-26 20:44:26 -04:00
Daniel Micay 5eb98841d6 removed unused zoom icons 2022-05-26 20:42:13 -04:00
Daniel Micay e297fdf7e4 ignore false positive lint warning 2022-05-26 20:41:47 -04:00
Daniel Micay 9355f54956 update Material library 2022-05-26 20:39:57 -04:00
dependabot[bot] 5dfdaa2c17 Bump gradle from 7.2.0 to 7.2.1
Bumps gradle from 7.2.0 to 7.2.1.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 16:39:38 -04:00
June 3411fb0426 Update pdf.js to v2.14.305
Signed-off-by: June <june@eridan.me>
2022-05-14 13:27:14 -04:00
dependabot[bot] af567a5c0c Bump gradle from 7.1.3 to 7.2.0
Bumps gradle from 7.1.3 to 7.2.0.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 18:04:52 -04:00
20 changed files with 160 additions and 65 deletions

View File

@ -32,12 +32,14 @@ android {
}
}
compileSdk = 32
buildToolsVersion = "32.0.0"
compileSdk = 33
buildToolsVersion = "33.0.0"
namespace = "app.grapheneos.pdfviewer"
defaultConfig {
minSdk = 21
targetSdk = 32
targetSdk = 33
resourceConfigurations.add("en")
}
@ -73,6 +75,6 @@ android {
}
dependencies {
implementation("androidx.appcompat:appcompat:1.4.1")
implementation("com.google.android.material:material:1.5.0")
implementation("androidx.appcompat:appcompat:1.5.1")
implementation("com.google.android.material:material:1.6.1")
}

View File

@ -1,7 +1,8 @@
<lint>
<!-- full backups are desired -->
<issue id="AllowBackup">
<ignore path="src/main/AndroidManifest.xml"/>
<!-- overly aggressive check -->
<issue id="VectorPath">
<ignore path="src/main/res/drawable/ic_rotate_left_24dp.xml"/>
<ignore path="src/main/res/drawable/ic_rotate_right_24dp.xml"/>
</issue>
<!-- Google app indexing doesn't make any sense for this app -->

@ -1 +1 @@
Subproject commit 070a365be5a7579f4ddd5a9a2d4efcd281c2d64f
Subproject commit cc3d3bf299ae11f8f72ae8d64cbf19b340f9a996

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.grapheneos.pdfviewer"
android:targetSandboxVersion="2">
<original-package android:name="org.grapheneos.pdfviewer" />

View File

@ -210,6 +210,7 @@ function loadDocument() {
}
loadingTask.promise.then(function (newDoc) {
channel.onLoaded();
pdfDoc = newDoc;
channel.setNumPages(pdfDoc.numPages);
pdfDoc.getMetadata().then(function (data) {

View File

@ -31,6 +31,7 @@ import androidx.core.view.ViewCompat;
import androidx.core.view.WindowCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
@ -40,7 +41,9 @@ import app.grapheneos.pdfviewer.databinding.PdfviewerBinding;
import app.grapheneos.pdfviewer.fragment.DocumentPropertiesFragment;
import app.grapheneos.pdfviewer.fragment.PasswordPromptFragment;
import app.grapheneos.pdfviewer.fragment.JumpToPageFragment;
import app.grapheneos.pdfviewer.ktx.ViewKt;
import app.grapheneos.pdfviewer.loader.DocumentPropertiesLoader;
import app.grapheneos.pdfviewer.viewModel.PasswordStatus;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@ -119,8 +122,8 @@ public class PdfViewer implements LoaderManager.LoaderCallbacks<List<CharSequenc
AppCompatActivity activity;
String fileName;
Long fileSize;
private Snackbar snackbar;
private PasswordPromptFragment mPasswordPromptFragment;
public PasswordStatus passwordValidationViewModel;
private class Channel {
@JavascriptInterface
@ -157,16 +160,23 @@ public class PdfViewer implements LoaderManager.LoaderCallbacks<List<CharSequenc
@JavascriptInterface
public void showPasswordPrompt() {
if (getPasswordPromptFragment().isAdded()) {
getPasswordPromptFragment().dismiss();
if (!getPasswordPromptFragment().isAdded()) {
getPasswordPromptFragment().show(activity.getSupportFragmentManager(), PasswordPromptFragment.class.getName());
}
getPasswordPromptFragment().show(activity.getSupportFragmentManager(), PasswordPromptFragment.class.getName());
passwordValidationViewModel.passwordMissing();
}
@JavascriptInterface
public void invalidPassword() {
activity.runOnUiThread(PdfViewer.this::notifyInvalidPassword);
showPasswordPrompt();
activity.runOnUiThread(() -> passwordValidationViewModel.invalid());
}
@JavascriptInterface
public void onLoaded() {
passwordValidationViewModel.validated();
if (getPasswordPromptFragment().isAdded()) {
getPasswordPromptFragment().dismiss();
}
}
@JavascriptInterface
@ -175,15 +185,12 @@ public class PdfViewer implements LoaderManager.LoaderCallbacks<List<CharSequenc
}
}
private void notifyInvalidPassword() {
snackbar.setText(R.string.password_prompt_invalid_password).show();
}
public PdfViewer(@NonNull AppCompatActivity activity) {
this.activity = activity;
binding = PdfviewerBinding.inflate(activity.getLayoutInflater());
activity.setContentView(binding.getRoot());
activity.setSupportActionBar(binding.toolbar);
passwordValidationViewModel = new ViewModelProvider(activity, ViewModelProvider.AndroidViewModelFactory.getInstance(activity.getApplication())).get(PasswordStatus.class);
WindowCompat.setDecorFitsSystemWindows(activity.getWindow(), false);
@ -283,8 +290,7 @@ public class PdfViewer implements LoaderManager.LoaderCallbacks<List<CharSequenc
public boolean onTapUp() {
binding.webview.evaluateJavascript("isTextSelected()", selection -> {
if (!Boolean.parseBoolean(selection)) {
if ((activity.getWindow().getDecorView().getSystemUiVisibility() &
View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
if (activity.getSupportActionBar().isShowing()) {
hideSystemUi();
} else {
showSystemUi();
@ -315,8 +321,6 @@ public class PdfViewer implements LoaderManager.LoaderCallbacks<List<CharSequenc
mTextView.setTextColor(ColorStateList.valueOf(Color.WHITE));
mTextView.setTextSize(18);
mTextView.setPadding(PADDING, 0, PADDING, 0);
snackbar = Snackbar.make(binding.getRoot(), "", Snackbar.LENGTH_LONG);
}
public void onDestroy() {
@ -456,21 +460,12 @@ public class PdfViewer implements LoaderManager.LoaderCallbacks<List<CharSequenc
}
private void showSystemUi() {
activity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
ViewKt.showSystemUi(binding.getRoot());
activity.getSupportActionBar().show();
}
private void hideSystemUi() {
activity.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_IMMERSIVE);
ViewKt.hideSystemUi(binding.getRoot());
activity.getSupportActionBar().hide();
}

View File

@ -39,14 +39,13 @@ public class Utils {
final Calendar calendar = Calendar.getInstance();
final int currentYear = calendar.get(Calendar.YEAR);
int year;
// Year is required
String field = date.substring(position += 2, 6);
if (!TextUtils.isDigitsOnly(field)) {
throw new ParseException("Invalid year", position);
}
year = Integer.parseInt(field);
int year = Integer.parseInt(field);
if (year > currentYear) {
year = currentYear;
}

View File

@ -15,15 +15,21 @@ import androidx.fragment.app.DialogFragment
import app.grapheneos.pdfviewer.PdfViewer
import app.grapheneos.pdfviewer.R
import app.grapheneos.pdfviewer.databinding.PasswordDialogFragmentBinding
import app.grapheneos.pdfviewer.viewModel.PasswordStatus
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout
class PasswordPromptFragment(private val pdfViewer: PdfViewer) : DialogFragment() {
private lateinit var passwordEditText : EditText
private lateinit var passwordLayout : TextInputLayout
private lateinit var passwordEditText : TextInputEditText
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val passwordPrompt = AlertDialog.Builder(requireContext())
val passwordPrompt = MaterialAlertDialogBuilder(requireContext())
val passwordDialogFragmentBinding =
PasswordDialogFragmentBinding.inflate(LayoutInflater.from(requireContext()))
passwordLayout = passwordDialogFragmentBinding.pdfPasswordTextInputLayout
passwordEditText = passwordDialogFragmentBinding.pdfPasswordEditText
passwordPrompt.setView(passwordDialogFragmentBinding.root)
passwordEditText.addTextChangedListener(object : TextWatcher {
@ -38,15 +44,39 @@ class PasswordPromptFragment(private val pdfViewer: PdfViewer) : DialogFragment(
sendPassword()
true
}
passwordPrompt.setPositiveButton(R.string.open) { _, _ -> sendPassword() }
passwordPrompt.setPositiveButton(R.string.open, null)
passwordPrompt.setNegativeButton(R.string.cancel, null)
val dialog = passwordPrompt.create()
passwordPrompt.setCancelable(false)
isCancelable = false
dialog.setCanceledOnTouchOutside(false)
dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE)
pdfViewer.passwordValidationViewModel.status.observe(
this
) {
when (it) {
PasswordStatus.Status.MissingPassword -> {
passwordEditText.editableText.clear()
passwordDialogFragmentBinding.title.setText(R.string.password_prompt_description)
}
PasswordStatus.Status.InvalidPassword -> {
passwordEditText.editableText.clear()
passwordDialogFragmentBinding.pdfPasswordTextInputLayout.error =
"invalid password"
}
PasswordStatus.Status.Validated -> {
//Activity will dismiss the dialog
}
else -> {
throw NullPointerException("status shouldn't be null")
}
}
}
return dialog
}
private fun updatePositiveButton() {
passwordLayout.error = ""
val btn = (dialog as AlertDialog).getButton(DialogInterface.BUTTON_POSITIVE)
btn.isEnabled = passwordEditText.text?.isNotEmpty() ?: false
}
@ -55,7 +85,6 @@ class PasswordPromptFragment(private val pdfViewer: PdfViewer) : DialogFragment(
val password = passwordEditText.text.toString()
if (!TextUtils.isEmpty(password)) {
pdfViewer.loadPdfWithPassword(password)
dialog?.dismiss()
}
}
@ -64,4 +93,11 @@ class PasswordPromptFragment(private val pdfViewer: PdfViewer) : DialogFragment(
updatePositiveButton()
passwordEditText.requestFocus()
}
override fun onResume() {
super.onResume()
(dialog as AlertDialog).getButton(DialogInterface.BUTTON_POSITIVE).setOnClickListener {
sendPassword()
}
}
}

View File

@ -0,0 +1,19 @@
package app.grapheneos.pdfviewer.ktx
import android.view.View
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
private val systemBars = WindowInsetsCompat.Type.statusBars()
fun View.hideSystemUi() {
val controller = ViewCompat.getWindowInsetsController(this) ?: return
controller.systemBarsBehavior =
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
controller.hide(systemBars)
}
fun View.showSystemUi() {
ViewCompat.getWindowInsetsController(this)?.show(systemBars)
}

View File

@ -0,0 +1,27 @@
package app.grapheneos.pdfviewer.viewModel
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
class PasswordStatus : ViewModel() {
enum class Status {
MissingPassword,
InvalidPassword,
Validated
}
val status: MutableLiveData<Status> = MutableLiveData(Status.MissingPassword)
fun passwordMissing() {
status.postValue(Status.MissingPassword)
}
fun invalid() {
status.postValue(Status.InvalidPassword)
}
fun validated() {
status.postValue(Status.Validated)
}
}

View File

@ -5,7 +5,8 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
@ -17,6 +18,7 @@
android:textSize="20sp" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/pdf_password_text_input_layout"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -14,7 +14,6 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="#212121"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</com.google.android.material.appbar.AppBarLayout>

View File

@ -1,13 +1,14 @@
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#DEFFFFFF</item>
<item name="android:statusBarColor">#212121</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">false</item>
</style>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.Material3.Dark" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.Material3.DynamicColors.Dark" />
</resources>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name">PDF Viewer</string>
<!--<string name="action_settings">Settings</string>-->
<string name="action_previous">Previous page</string>
@ -15,11 +15,10 @@
<string name="document_properties_retrieval_failed">Failed to obtain document metadata</string>
<string name="webview_out_of_date_title">WebView out-of-date</string>
<string name="webview_out_of_date_message">Your current WebView version is %1$d. The WebView should be at least version %2$d for the PDF Viewer to work.</string>
<string name="webview_out_of_date_message" tools:ignore="PluralsCandidate">Your current WebView version is %1$d. The WebView should be at least version %2$d for the PDF Viewer to work.</string>
<string name="password_prompt_hint">Password</string>
<string name="password_prompt_description">Enter the password to decrypt this PDF file</string>
<string name="password_prompt_invalid_password">Invalid password</string>
<string name="open">Open</string>
<string name="cancel">Cancel</string>
</resources>

View File

@ -1,15 +1,16 @@
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#000000</item>
<item name="android:statusBarColor">#212121</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightNavigationBar" tools:ignore="NewApi">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.Material3.Dark" />
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.Material3.DynamicColors.Dark" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.Material3.Light" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.Material3.DynamicColors.Light" />
</resources>

View File

@ -1,11 +1,17 @@
buildscript {
repositories {
google()
mavenCentral()
// dependabot cannot handle google()
maven {
url = uri("https://dl.google.com/dl/android/maven2")
}
// dependabot cannot handle mavenCentral()
maven {
url = uri("https://repo.maven.apache.org/maven2")
}
}
dependencies {
classpath("com.android.tools.build:gradle:7.1.3")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
classpath("com.android.tools.build:gradle:7.3.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
}
}

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

6
gradlew vendored
View File

@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

14
gradlew.bat vendored
View File

@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal