diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8086ddc..05b08cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,11 +9,19 @@ on: - '*.gradle' - '*.properties' workflow_dispatch: + inputs: + release: + description: 'Release' + type: boolean + required: true + default: false jobs: build: name: Build runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout @@ -23,34 +31,76 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '8' + java-version: '17' - name: Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches/ ~/.gradle/wrapper/ key: ${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} + - name: Set environments + run: | + { + echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")" + echo "commit=$(echo ${{ github.sha }} | cut -c-7)" + echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})" + } >> $GITHUB_ENV + + - name: Check tag exists + uses: mukunku/tag-exists-action@v1.5.0 + if: github.event.inputs.release == 'true' + id: check-tag + with: + tag: "${{ env.version }}" + + - name: Release check + if: github.event.inputs.release == 'true' + run: | + if [[ "${{ secrets.STORE_FILE }}" == "" ]]; then + echo -e "\nERROR!\nリリースするには、 署名鍵を設定する必要があります。\n" + echo "STORE_FILE: JKS形式の署名鍵をBase64でエンコードした文字列" + echo "STORE_PASSWORD: キーストアのパスワード" + echo "KEY_ALIAS: 署名のエイリアス" + echo "KEY_PASSWORD: 署名のパスワード" + echo "" + exit 1 + fi + if [[ "${{ steps.check-tag.outputs.exists }}" == "true" ]]; then + echo -e "\nERROR!\n既に同じタグが存在します。\n" + echo "build.gradle の versionName を変更してください" + echo "" + exit 1 + fi + - name: Build with Gradle run: | - if [[ -n "${{ secrets.STORE_FILE }}" ]] && [[ -n "${{ secrets.STORE_PASSWORD }}" ]] && [[ -n "${{ secrets.KEY_ALIAS }}" ]] && [[ -n "${{ secrets.KEY_PASSWORD }}" ]]; then + if [[ "${{ inputs.release }}" == "true" ]]; then echo "${{ secrets.STORE_FILE }}" | base64 -d > app/release.jks export STORE_PASSWORD="${{ secrets.STORE_PASSWORD }}" export KEY_ALIAS="${{ secrets.KEY_ALIAS }}" export KEY_PASSWORD="${{ secrets.KEY_PASSWORD }}" - ./gradlew assembleRelease + ./gradlew aR --no-daemon + cp -f app/build/outputs/apk/release/app-release.apk ${{ env.repo }}-${{ env.version }}.apk else - ./gradlew assembleDebug + ./gradlew asD --no-daemon + cp -f app/build/outputs/apk/debug/app-debug.apk ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.apk fi - { - echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")" - echo "commit=$(echo ${{ github.sha }} | cut -c-7)" - } >> $GITHUB_ENV - name: Upload APK uses: actions/upload-artifact@v4 + if: github.event.inputs.release != 'true' + with: + name: ${{ env.repo }}(${{ env.version }}@${{ env.commit }}) + path: ${{ env.repo }}-${{ env.version }}@${{ env.commit }}.apk + + - name: Release + uses: softprops/action-gh-release@v1 + if: github.event.inputs.release == 'true' with: - name: GalaxyCamSnd(${{ env.version }}@${{ env.commit }}) - path: app/build/outputs/apk/**/app-*.apk + tag_name: ${{ env.version }} + draft: true + prerelease: false + files: ${{ env.repo }}-${{ env.version }}.apk \ No newline at end of file diff --git a/.gitignore b/.gitignore index 207e977..57d3bcb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,7 @@ # Gradle Build /app/build/ # Android Studio Signing APK -/app/release/ \ No newline at end of file +/app/debug/ +/app/release/ +# VSCode +/.vscode/ \ No newline at end of file diff --git a/LICENSE b/LICENSE index 94a9ed0..9c090e8 100644 --- a/LICENSE +++ b/LICENSE @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - Copyright (C) + Galaxy CamSnd Disabling shutter sound. + Copyright (C) 2023 Syuugo This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + Galaxy CamSnd Copyright (C) 2023 Syuugo This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/PRIVACY.md b/PRIVACY.md new file mode 100644 index 0000000..6852e83 --- /dev/null +++ b/PRIVACY.md @@ -0,0 +1,22 @@ +# プライバシーポリシー + + + +このアプリは利用者の個人情報を一切収集いたしません。プライバシーとデータの保護に関して取り決めが不要です。 + + +1. **データ収集の明示的な許可**: + 当アプリは位置情報、個人識別情報、またはその他の個人に関するデータを収集いたしません。したがって、データ収集に関する許可の求めもございません。 + +2. **外部サービスとの連携**: + 当アプリは外部サービスとの連携により、利用者データを取得することはありません。 + +3. **データの保存と保管**: + 当アプリは利用者データを保存または保管することはありません。データが一切サーバーに送信されないため、安全性が確保されています。 + +4. **セキュリティ**: + 利用者のプライバシーとセキュリティを重視し、当アプリは利用者データの収集や蓄積を行わないため、セキュリティ上の懸念は発生しません。 + +何かご不明点や質問がございましたら、[**Issues**](https://github.com/s1204IT/GalaxyCamSnd/issues)からお問い合わせください。 \ No newline at end of file diff --git a/README.md b/README.md index 86ad390..0e2f68f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ ## インストール方法 -1. [**ここ**](https://github.com/s1204IT/GalaxyCamSnd/releases/latest/download/GalaxyCamSnd.apk)からアプリファイル(APK)をダウンロードする +1. [**ここ**](https://github.com/s1204IT/GalaxyCamSnd/releases/latest/)からアプリファイル(APK)をダウンロードする 2. ダウンロード後、「**開く**」を押す > [!TIP] > 「セキュリティ上の理由から...」と表示された場合は、 diff --git a/app/android.jks b/app/android.jks new file mode 100644 index 0000000..5423804 Binary files /dev/null and b/app/android.jks differ diff --git a/app/build.gradle b/app/build.gradle index 7e2ceab..60d7ec8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,18 +3,24 @@ plugins { } android { - compileSdk 33 - buildToolsVersion "30.0.3" + namespace 'me.s1204.galaxycamsnd' + compileSdk 34 defaultConfig { - applicationId 'me.s1204.galaxycamsnd' minSdk 28 + //noinspection ExpiredTargetSdkVersion targetSdk 22 - versionCode 13 - versionName "1.4.1" + versionCode 14 + versionName "1.4.2" } signingConfigs { + android { + storeFile file('android.jks') + storePassword 'android' + keyAlias 'android' + keyPassword 'android' + } release { storeFile file('release.jks') storePassword System.getenv('STORE_PASSWORD') @@ -25,16 +31,25 @@ android { buildTypes { debug { - signingConfig signingConfigs.debug minifyEnabled true shrinkResources true + multiDexEnabled false proguardFiles += 'proguard-rules.pro' + signingConfig signingConfigs.android } release { - signingConfig signingConfigs.release minifyEnabled true shrinkResources true + multiDexEnabled false proguardFiles += 'proguard-rules.pro' + if (file('release.jks').exists()) { + signingConfig signingConfigs.release + } } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } } diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..222f7c1 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,3 @@ +-ignorewarnings +-keepattributes LineNumberTable,SourceFile +-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 62145a5..2f91fe3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + @@ -9,7 +8,8 @@ android:allowBackup="true" android:appCategory="productivity" android:icon="@drawable/ic_launcher" - android:label="Galaxy CamSnd"> + android:label="@string/app_name" + android:theme="@android:style/Theme.NoDisplay"> + android:label="@string/enable_shutter_sound" + android:launchMode="singleInstance" + android:theme="@android:style/Theme.Material.Dialog.Alert"> @@ -34,23 +38,9 @@ - + - - - - - - - - diff --git a/app/src/main/java/me/s1204/galaxycamsnd/BootCompletedReceiver.java b/app/src/main/java/me/s1204/galaxycamsnd/BootCompletedReceiver.java index e1d2cfd..84b2b62 100644 --- a/app/src/main/java/me/s1204/galaxycamsnd/BootCompletedReceiver.java +++ b/app/src/main/java/me/s1204/galaxycamsnd/BootCompletedReceiver.java @@ -1,16 +1,14 @@ package me.s1204.galaxycamsnd; -import android.annotation.SuppressLint; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; -import static android.provider.Settings.System.*; +import android.provider.Settings; public class BootCompletedReceiver extends BroadcastReceiver { - @SuppressLint("UnsafeProtectedBroadcastReceiver") public void onReceive(Context c, Intent i) { - if (canWrite(c)) { - putInt(c.getContentResolver(), "csc_pref_camera_forced_shuttersound_key", 0); + if (Settings.System.canWrite(c)) { + Settings.System.putInt(c.getContentResolver(), CameraActivity.shutter_sound_volume, 0); } } } diff --git a/app/src/main/java/me/s1204/galaxycamsnd/CameraActivity.java b/app/src/main/java/me/s1204/galaxycamsnd/CameraActivity.java index 74a2427..5ecb83d 100644 --- a/app/src/main/java/me/s1204/galaxycamsnd/CameraActivity.java +++ b/app/src/main/java/me/s1204/galaxycamsnd/CameraActivity.java @@ -1,6 +1,7 @@ package me.s1204.galaxycamsnd; import android.app.Activity; +import android.content.ActivityNotFoundException; import android.content.Intent; import android.os.Bundle; import android.net.Uri; @@ -8,16 +9,32 @@ import android.widget.Toast; public class CameraActivity extends Activity { + + protected static final String shutter_sound_volume = "csc_pref_camera_forced_shuttersound_key"; + protected static final String camera_package = "com.sec.android.app.camera"; + protected static final String camera_activity = camera_package + ".Camera"; + protected static final String package_prefix = "package:"; + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - Intent intent; finishAndRemoveTask(); + Intent intent = null; if (Settings.System.canWrite(this)) { - Settings.System.putInt(getContentResolver(), "csc_pref_camera_forced_shuttersound_key", 0); - intent = new Intent().setClassName("com.sec.android.app.camera", "com.sec.android.app.camera.Camera"); + try { + Settings.System.putInt(getContentResolver(), shutter_sound_volume, 0); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + Toast.makeText(this, R.string.failed_write_value, Toast.LENGTH_LONG).show(); + } + try { + intent = new Intent().setClassName(camera_package, camera_activity); + } catch (ActivityNotFoundException e) { + e.printStackTrace(); + Toast.makeText(this, R.string.failed_launch_activity, Toast.LENGTH_LONG).show(); + } } else { - Toast.makeText(this, R.string.write, Toast.LENGTH_LONG).show(); - intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, Uri.parse("package:" + getPackageName())).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + Toast.makeText(this, R.string.request_write_permission, Toast.LENGTH_LONG).show(); + intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, Uri.parse(package_prefix + getPackageName())).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } startActivity(intent); } diff --git a/app/src/main/java/me/s1204/galaxycamsnd/DeviceAdminReceiver.java b/app/src/main/java/me/s1204/galaxycamsnd/DeviceAdminReceiver.java deleted file mode 100644 index 3cdaf47..0000000 --- a/app/src/main/java/me/s1204/galaxycamsnd/DeviceAdminReceiver.java +++ /dev/null @@ -1,4 +0,0 @@ -package me.s1204.galaxycamsnd; - -public class DeviceAdminReceiver extends android.app.admin.DeviceAdminReceiver { -} diff --git a/app/src/main/java/me/s1204/galaxycamsnd/DisableActivity.java b/app/src/main/java/me/s1204/galaxycamsnd/DisableActivity.java index 0562845..1359e7c 100644 --- a/app/src/main/java/me/s1204/galaxycamsnd/DisableActivity.java +++ b/app/src/main/java/me/s1204/galaxycamsnd/DisableActivity.java @@ -1,45 +1,55 @@ package me.s1204.galaxycamsnd; import android.app.Activity; +import android.app.AlertDialog; import android.content.ComponentName; import android.content.Intent; +import android.net.Uri; import android.os.Bundle; +import android.os.Handler; +import android.provider.Settings; +import android.widget.Toast; + import static android.content.Intent.*; import static android.content.pm.PackageManager.*; import static android.net.Uri.parse; -import static android.provider.Settings.*; -import static android.provider.Settings.System.*; import static android.widget.Toast.*; public class DisableActivity extends Activity { + + private void ofDisable(Class cls) { + // for でループさせると分割クラスが呼び出されるため使用不可 + getPackageManager().setComponentEnabledSetting(new ComponentName(this, cls), COMPONENT_ENABLED_STATE_DISABLED, DONT_KILL_APP); + } + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - finishAndRemoveTask(); - if (canWrite(this)) { - putInt( - getContentResolver(), - "csc_pref_camera_forced_shuttersound_key", - 1 - ); - makeText(this, R.string.enabled, LENGTH_LONG).show(); - getPackageManager().setComponentEnabledSetting( - new ComponentName(this, BootCompletedReceiver.class), - COMPONENT_ENABLED_STATE_DISABLED, - DONT_KILL_APP - ); - startActivity( - new Intent(ACTION_DELETE).setData( - parse("package:" + getPackageName()) - ) - ); - } else { - makeText(this, R.string.write, LENGTH_LONG).show(); - startActivity( - new Intent( - ACTION_MANAGE_WRITE_SETTINGS, - parse("package:" + getPackageName()) - ).setFlags(FLAG_ACTIVITY_NEW_TASK) - ); + try { + new AlertDialog.Builder(this) + .setTitle(R.string.enable_shutter_sound) + .setIcon(getPackageManager().getApplicationIcon(getPackageName())) + .setMessage(R.string.dialog) + // "はい" + .setPositiveButton(R.string.yes, (d, s) -> { + if (Settings.System.canWrite(this)) { + Settings.System.putInt(getContentResolver(), CameraActivity.shutter_sound_volume, 1); + makeText(this, R.string.shutter_sound_enabled, LENGTH_LONG).show(); + ofDisable(CameraActivity.class); + ofDisable(BootCompletedReceiver.class); + ofDisable(DisableActivity.class); + // アンインストールを要求 + startActivity(new Intent(ACTION_DELETE).setData(parse(CameraActivity.package_prefix + getPackageName()))); + } else { + finishAndRemoveTask(); + makeText(this, R.string.request_write_permission, LENGTH_LONG).show(); + startActivity(new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, parse(CameraActivity.package_prefix + getPackageName())).setFlags(FLAG_ACTIVITY_NEW_TASK)); + } + }) + // "いいえ" + .setNegativeButton(R.string.no, (d, s) -> finish()) + .show(); + } catch (NameNotFoundException ignored) { } + } } diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml new file mode 100644 index 0000000..c9e4716 --- /dev/null +++ b/app/src/main/res/values-ja/strings.xml @@ -0,0 +1,11 @@ + + 無音カメラ + シャッター音の有効化 + シャッター音を有効にしました + [Galaxy CamSnd] を有効にしてください + 値の書き込みに失敗しました + アクティビティの起動に失敗しました + この機能を実行すると、シャッター音が再び有効になります。\nただし、再度無効化する場合は、アプリをインストールし直す必要があります。\n\n続行しますか? + はい + いいえ + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7271a12..0cbaab4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,12 @@ - 無音カメラ - シャッター音の有効化 - シャッター音を有効にしました - 「Galaxy CamSnd」を有効にしてください + Galaxy CamSnd + Silent Camera + Enable shutter sound + Succeed enabling shutter sound + Please enable [Galaxy CamSnd] + Failed write value + Failed launch activity + When you perform this feature, the shutter sound will be re-enabled.\nHowever, if you want to disable it again, you will need to reinstall this app.\n\nDo you want to continue? + Yes + No diff --git a/app/src/main/res/xml/device_admin.xml b/app/src/main/res/xml/device_admin.xml deleted file mode 100644 index efde889..0000000 --- a/app/src/main/res/xml/device_admin.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 41d0969..0000000 --- a/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -buildscript { - repositories { - mavenCentral() - google() - } - dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' - } -} - -allprojects { - repositories { - mavenCentral() - google() - } -} diff --git a/gradle.properties b/gradle.properties index e893dcc..a61d212 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,2 @@ -android.enableR8.fullMode=true -org.gradle.daemon=false -android.enableBuildCache=false \ No newline at end of file +org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8 +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c..d64cd49 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 53b9e38..1af9e09 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,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. diff --git a/gradlew.bat b/gradlew.bat index 107acd3..93e3f59 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -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,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,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 +76,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 diff --git a/settings.gradle b/settings.gradle index bedb1ce..606de32 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,18 @@ -rootProject.name = 'GalaxyCamSnd' +pluginManagement { + repositories { + google() + mavenCentral() + } + plugins { + id 'com.android.application' version '8.2.2' apply false + } +} +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } +} + +rootProject.name = 'Galaxy CamSnd' include ':app' \ No newline at end of file