diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..411c07777 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto eol=lf + +*.bat text eol=crlf +*.jar binary diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ac72f0bef..5508155e5 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -12,23 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: set up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: '11' distribution: 'temurin' - cache: gradle - - - name: Generate temporary keystore - run: keytool -genkey -v -storetype pkcs12 -keystore store.p12 -storepass android -alias android -keyalg RSA -keysize 2048 -validity 10000 -dname CN=CI - - name: Write retro.properties - run: | - cat >retro.properties < properties.load(stream) } + } else { + properties = null } return properties } static def getProperty(Properties properties, String name) { - return properties.getProperty(name) ?: "$name missing" + return properties?.getProperty(name) ?: "$name missing" } dependencies { @@ -137,11 +144,7 @@ dependencies { implementation 'com.afollestad:material-cab:2.0.1' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - - def kotlin_coroutines_version = '1.6.3' - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4" def koin_version = '3.2.0' implementation "io.insert-koin:koin-core:$koin_version" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 987f89181..9df88e865 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> diff --git a/appthemehelper/.gitignore b/appthemehelper/.gitignore deleted file mode 100644 index 796b96d1c..000000000 --- a/appthemehelper/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/appthemehelper/build.gradle b/appthemehelper/build.gradle index cbb0934dd..31bfc76af 100644 --- a/appthemehelper/build.gradle +++ b/appthemehelper/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { compileSdk 32 + namespace "code.name.monkey.appthemehelper" defaultConfig { minSdk 21 @@ -26,6 +27,4 @@ dependencies { implementation "androidx.appcompat:appcompat:$appcompat_version" implementation "com.google.android.material:material:$mdc_version" implementation "androidx.preference:preference-ktx:$preference_version" - - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" } diff --git a/appthemehelper/src/main/AndroidManifest.xml b/appthemehelper/src/main/AndroidManifest.xml index a0b00a102..cc947c567 100644 --- a/appthemehelper/src/main/AndroidManifest.xml +++ b/appthemehelper/src/main/AndroidManifest.xml @@ -1 +1 @@ - + diff --git a/build.gradle b/build.gradle index 47d09a145..a7c795284 100644 --- a/build.gradle +++ b/build.gradle @@ -2,9 +2,8 @@ buildscript { ext { - kotlin_version = '1.7.0' - lifecycle_version='2.5.0-rc02' - navigation_version = '2.5.0-rc02' + lifecycle_version='2.5.0' + navigation_version = '2.5.0' mdc_version = '1.7.0-alpha02' preference_version = '1.2.0' appcompat_version = '1.4.2' @@ -17,13 +16,26 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:7.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version" } } plugins { id "com.github.ben-manes.versions" version "0.42.0" } + +def isNonStable = { String version -> + def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) } + def regex = /^[0-9,.v-]+(-r)?$/ + return !stableKeyword && !(version ==~ regex) +} + +tasks.named("dependencyUpdates").configure { + rejectVersionIf { + isNonStable(it.candidate.version) + } +} + task clean(type: Delete) { delete rootProject.buildDir } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2..249e5832f 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 59250647c..8049c684f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c78733..a69d9cb6c 100755 --- a/gradlew +++ b/gradlew @@ -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. diff --git a/gradlew.bat b/gradlew.bat index 107acd32c..f127cfd49 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,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