Skip to content

Commit f29186e

Browse files
authored
Merge pull request #1051 from wordpress-mobile/build/upgrade-gradle-to-8.1.1-and-agp-to-8.0.2
[Build] Upgrade Gradle to 8.2.1 and AGP to 8.1.0
2 parents 6a119a9 + c779d13 commit f29186e

File tree

20 files changed

+68
-52
lines changed

20 files changed

+68
-52
lines changed

Diff for: .java-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
17.0

Diff for: app/build.gradle

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ plugins {
44
}
55

66
android {
7+
namespace "org.wordpress.aztec.demo"
8+
79
compileSdkVersion rootProject.compileSdkVersion
810

911
defaultConfig {
@@ -27,9 +29,13 @@ android {
2729
androidTest.java.srcDirs += 'src/androidTest/kotlin'
2830
}
2931

30-
lintOptions {
32+
lint {
3133
disable 'GradleCompatible'
3234
}
35+
36+
buildFeatures {
37+
buildConfig true
38+
}
3339
}
3440

3541
dependencies {

Diff for: app/src/main/AndroidManifest.xml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
<manifest
2-
xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.demo">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:tools="http://schemas.android.com/tools"
3+
xmlns:android="http://schemas.android.com/apk/res/android">
44

55
<!-- Required for downloading images -->
66
<uses-permission android:name="android.permission.INTERNET" />
77

88
<!-- Required for adding media and requested at runtime -->
9-
<uses-permission android:name="android.permission.CAMERA" />
9+
<uses-permission android:name="android.permission.CAMERA"
10+
tools:ignore="PermissionImpliesUnsupportedChromeOsHardware" />
1011
<!-- Allows for storing and retrieving screenshots, photos, videos and audios -->
1112
<uses-permission
1213
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
@@ -18,6 +19,8 @@
1819
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
1920
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
2021

22+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
23+
2124
<application
2225
android:label="@string/app_name"
2326
android:allowBackup="true"

Diff for: aztec/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {
1113
minSdkVersion rootProject.minSdkVersion
1214
targetSdkVersion rootProject.targetSdkVersion
13-
versionName "1.0"
1415
vectorDrawables.useSupportLibrary = true
1516
}
1617

@@ -81,7 +82,6 @@ project.afterEvaluate {
8182

8283
groupId "org.wordpress"
8384
artifactId "aztec"
84-
artifact tasks.named("androidSourcesJar")
8585
// version is set by 'publish-to-s3' plugin
8686
}
8787
}

Diff for: aztec/src/main/AndroidManifest.xml

-3
This file was deleted.

Diff for: glide-loader/build.gradle

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.glideloader"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {
1113
minSdkVersion rootProject.minSdkVersion
1214
targetSdkVersion rootProject.targetSdkVersion
13-
versionCode 1
14-
versionName "1.0"
15-
1615
}
1716

1817
buildTypes {
@@ -36,7 +35,6 @@ project.afterEvaluate {
3635

3736
groupId "org.wordpress.aztec"
3837
artifactId "glide-loader"
39-
artifact tasks.named("androidSourcesJar")
4038
// version is set by 'publish-to-s3' plugin
4139
}
4240
}

Diff for: glide-loader/src/main/AndroidManifest.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<manifest
2-
xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.glideloader">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

Diff for: gradle/wrapper/gradle-wrapper.jar

3.47 KB
Binary file not shown.

Diff for: gradle/wrapper/gradle-wrapper.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

Diff for: gradlew

+22-8
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
9087

9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
@@ -133,22 +130,29 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -193,6 +197,10 @@ if "$cygwin" || "$msys" ; then
193197
done
194198
fi
195199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
196204
# Collect all arguments for the java command;
197205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198206
# shell script including quotes and variable substitutions, so put them in
@@ -205,6 +213,12 @@ set -- \
205213
org.gradle.wrapper.GradleWrapperMain \
206214
"$@"
207215

216+
# Stop when "xargs" is not available.
217+
if ! command -v xargs >/dev/null 2>&1
218+
then
219+
die "xargs is not available"
220+
fi
221+
208222
# Use "xargs" to parse quoted args.
209223
#
210224
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

Diff for: gradlew.bat

+9-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4041

4142
set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44+
if %ERRORLEVEL% equ 0 goto execute
4445

4546
echo.
4647
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
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
if %ERRORLEVEL% equ 0 goto mainEnd
7980

8081
:fail
8182
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8283
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
84+
set EXIT_CODE=%ERRORLEVEL%
85+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87+
exit /b %EXIT_CODE%
8588

8689
:mainEnd
8790
if "%OS%"=="Windows_NT" endlocal

Diff for: media-placeholders/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.placeholders"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {
1113
minSdkVersion rootProject.minSdkVersion
1214
targetSdkVersion rootProject.targetSdkVersion
13-
versionName "1.0"
1415
}
1516

1617
buildTypes {
@@ -50,7 +51,6 @@ project.afterEvaluate {
5051

5152
groupId "org.wordpress.aztec"
5253
artifactId "media-placeholders"
53-
artifact tasks.named("androidSourcesJar")
5454
// version is set by 'publish-to-s3' plugin
5555
}
5656
}

Diff for: media-placeholders/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.placeholders">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

Diff for: picasso-loader/build.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.picassoloader"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {
1113
minSdkVersion rootProject.minSdkVersion
1214
targetSdkVersion rootProject.targetSdkVersion
13-
versionCode 1
14-
versionName "1.0"
1515
}
1616

1717
buildTypes {
@@ -39,7 +39,6 @@ project.afterEvaluate {
3939

4040
groupId "org.wordpress.aztec"
4141
artifactId "picasso-loader"
42-
artifact tasks.named("androidSourcesJar")
4342
// version is set by 'publish-to-s3' plugin
4443
}
4544
}

Diff for: picasso-loader/src/main/AndroidManifest.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<manifest
2-
xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.wordpress.aztec.picassoloader">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

Diff for: settings.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pluginManagement {
22
gradle.ext.kotlinVersion = '1.6.10'
3-
gradle.ext.agpVersion = '7.2.1'
4-
gradle.ext.automatticPublishToS3Version = '0.7.0'
3+
gradle.ext.agpVersion = '8.1.0'
4+
gradle.ext.automatticPublishToS3Version = '0.8.0'
55

66
plugins {
77
id "com.android.library" version gradle.ext.agpVersion

Diff for: wordpress-comments/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.plugins.wpcomments"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {
1113
minSdkVersion rootProject.minSdkVersion
1214
targetSdkVersion rootProject.targetSdkVersion
13-
versionName "1.0"
1415
vectorDrawables.useSupportLibrary = true
1516
}
1617

@@ -53,7 +54,6 @@ project.afterEvaluate {
5354

5455
groupId "org.wordpress.aztec"
5556
artifactId "wordpress-comments"
56-
artifact tasks.named("androidSourcesJar")
5757
// version is set by 'publish-to-s3' plugin
5858
}
5959
}

Diff for: wordpress-comments/src/main/AndroidManifest.xml

-2
This file was deleted.

Diff for: wordpress-shortcodes/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ plugins {
55
}
66

77
android {
8+
namespace "org.wordpress.aztec.plugins.shortcodes"
9+
810
compileSdkVersion rootProject.compileSdkVersion
911

1012
defaultConfig {
1113
minSdkVersion rootProject.minSdkVersion
1214
targetSdkVersion rootProject.targetSdkVersion
13-
versionName "1.0"
1415
}
1516

1617
buildTypes {
@@ -50,7 +51,6 @@ project.afterEvaluate {
5051

5152
groupId "org.wordpress.aztec"
5253
artifactId "wordpress-shortcodes"
53-
artifact tasks.named("androidSourcesJar")
5454
// version is set by 'publish-to-s3' plugin
5555
}
5656
}

Diff for: wordpress-shortcodes/src/main/AndroidManifest.xml

-2
This file was deleted.

0 commit comments

Comments
 (0)