diff --git a/.java-version b/.java-version new file mode 100644 index 000000000..03b6389f3 --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +17.0 diff --git a/app/build.gradle b/app/build.gradle index 00a890f21..787d545e6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,8 @@ plugins { } android { + namespace "org.wordpress.aztec.demo" + compileSdkVersion rootProject.compileSdkVersion defaultConfig { @@ -27,9 +29,13 @@ android { androidTest.java.srcDirs += 'src/androidTest/kotlin' } - lintOptions { + lint { disable 'GradleCompatible' } + + buildFeatures { + buildConfig true + } } dependencies { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ae0682204..5a895aad0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,12 +1,13 @@ - + + - + + + - - diff --git a/glide-loader/build.gradle b/glide-loader/build.gradle index 738531c3d..00fe0d4b2 100644 --- a/glide-loader/build.gradle +++ b/glide-loader/build.gradle @@ -5,14 +5,13 @@ plugins { } android { + namespace "org.wordpress.aztec.glideloader" + compileSdkVersion rootProject.compileSdkVersion defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion - versionCode 1 - versionName "1.0" - } buildTypes { @@ -36,7 +35,6 @@ project.afterEvaluate { groupId "org.wordpress.aztec" artifactId "glide-loader" - artifact tasks.named("androidSourcesJar") // version is set by 'publish-to-s3' plugin } } diff --git a/glide-loader/src/main/AndroidManifest.xml b/glide-loader/src/main/AndroidManifest.xml index 54e8a775e..7f7310d93 100644 --- a/glide-loader/src/main/AndroidManifest.xml +++ b/glide-loader/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + + /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=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=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,6 +197,10 @@ if "$cygwin" || "$msys" ; then done fi + +# 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, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -205,6 +213,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 ac1b06f93..6689b85be 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/media-placeholders/build.gradle b/media-placeholders/build.gradle index 739adb67d..66f820f83 100644 --- a/media-placeholders/build.gradle +++ b/media-placeholders/build.gradle @@ -5,12 +5,13 @@ plugins { } android { + namespace "org.wordpress.aztec.placeholders" + compileSdkVersion rootProject.compileSdkVersion defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion - versionName "1.0" } buildTypes { @@ -50,7 +51,6 @@ project.afterEvaluate { groupId "org.wordpress.aztec" artifactId "media-placeholders" - artifact tasks.named("androidSourcesJar") // version is set by 'publish-to-s3' plugin } } diff --git a/media-placeholders/src/main/AndroidManifest.xml b/media-placeholders/src/main/AndroidManifest.xml index ffaea1ac1..7f7310d93 100644 --- a/media-placeholders/src/main/AndroidManifest.xml +++ b/media-placeholders/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + + + diff --git a/wordpress-shortcodes/build.gradle b/wordpress-shortcodes/build.gradle index 84de710e2..672aeb681 100644 --- a/wordpress-shortcodes/build.gradle +++ b/wordpress-shortcodes/build.gradle @@ -5,12 +5,13 @@ plugins { } android { + namespace "org.wordpress.aztec.plugins.shortcodes" + compileSdkVersion rootProject.compileSdkVersion defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion - versionName "1.0" } buildTypes { @@ -50,7 +51,6 @@ project.afterEvaluate { groupId "org.wordpress.aztec" artifactId "wordpress-shortcodes" - artifact tasks.named("androidSourcesJar") // version is set by 'publish-to-s3' plugin } } diff --git a/wordpress-shortcodes/src/main/AndroidManifest.xml b/wordpress-shortcodes/src/main/AndroidManifest.xml deleted file mode 100644 index fab7c311b..000000000 --- a/wordpress-shortcodes/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ -