Skip to content

Commit 0b106b1

Browse files
authored
Upgrade to Gradle 7.1.1 (#115)
1 parent 72dbd01 commit 0b106b1

File tree

9 files changed

+158
-122
lines changed

9 files changed

+158
-122
lines changed

readium/lcp/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
88

99
### Changed
1010

11-
* Upgraded to Kotlin 1.5.20.
11+
* Upgraded to Kotlin 1.5.21 and Gradle 7.1.1
1212

1313

1414
## [2.0.0]

readium/lcp/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.5.20'
4+
ext.kotlin_version = '1.5.21'
55

66
repositories {
77
google()
88
jcenter()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:4.2.2'
11+
classpath 'com.android.tools.build:gradle:7.0.0'
1212

1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414

15-
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1615
// NOTE: Do not place your application dependencies here; they belong
1716
// in the individual module build.gradle files
1817
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:16caeaf66d57a0d1d2087fef6a97efa62de8da69afa5b908f40db35afc4342da
3-
size 53636
2+
oid sha256:33ad4583fd7ee156f533778736fa1b4940bd83b433934d1cc4e9f608e99a6a89
3+
size 59536
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 25 13:42:26 CEST 2021
21
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
42
distributionPath=wrapper/dists
5-
zipStorePath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
64
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

readium/lcp/gradlew

Lines changed: 69 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,59 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
2+
3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
218

319
##############################################################################
420
##
521
## Gradle start up script for UN*X
622
##
723
##############################################################################
824

9-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10-
DEFAULT_JVM_OPTS=""
25+
# Attempt to set APP_HOME
26+
# Resolve links: $0 may be a link
27+
PRG="$0"
28+
# Need this for relative symlinks.
29+
while [ -h "$PRG" ] ; do
30+
ls=`ls -ld "$PRG"`
31+
link=`expr "$ls" : '.*-> \(.*\)$'`
32+
if expr "$link" : '/.*' > /dev/null; then
33+
PRG="$link"
34+
else
35+
PRG=`dirname "$PRG"`"/$link"
36+
fi
37+
done
38+
SAVED="`pwd`"
39+
cd "`dirname \"$PRG\"`/" >/dev/null
40+
APP_HOME="`pwd -P`"
41+
cd "$SAVED" >/dev/null
1142

1243
APP_NAME="Gradle"
1344
APP_BASE_NAME=`basename "$0"`
1445

46+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48+
1549
# Use the maximum available, or set MAX_FD != -1 to use that value.
1650
MAX_FD="maximum"
1751

18-
warn ( ) {
52+
warn () {
1953
echo "$*"
2054
}
2155

22-
die ( ) {
56+
die () {
2357
echo
2458
echo "$*"
2559
echo
@@ -30,38 +64,25 @@ die ( ) {
3064
cygwin=false
3165
msys=false
3266
darwin=false
67+
nonstop=false
3368
case "`uname`" in
3469
CYGWIN* )
3570
cygwin=true
3671
;;
3772
Darwin* )
3873
darwin=true
3974
;;
40-
MINGW* )
75+
MSYS* | MINGW* )
4176
msys=true
4277
;;
78+
NONSTOP* )
79+
nonstop=true
80+
;;
4381
esac
4482

45-
# Attempt to set APP_HOME
46-
# Resolve links: $0 may be a link
47-
PRG="$0"
48-
# Need this for relative symlinks.
49-
while [ -h "$PRG" ] ; do
50-
ls=`ls -ld "$PRG"`
51-
link=`expr "$ls" : '.*-> \(.*\)$'`
52-
if expr "$link" : '/.*' > /dev/null; then
53-
PRG="$link"
54-
else
55-
PRG=`dirname "$PRG"`"/$link"
56-
fi
57-
done
58-
SAVED="`pwd`"
59-
cd "`dirname \"$PRG\"`/" >/dev/null
60-
APP_HOME="`pwd -P`"
61-
cd "$SAVED" >/dev/null
62-
6383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6484

85+
6586
# Determine the Java command to use to start the JVM.
6687
if [ -n "$JAVA_HOME" ] ; then
6788
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -85,7 +106,7 @@ location of your Java installation."
85106
fi
86107

87108
# Increase the maximum file descriptors if we can.
88-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
109+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
89110
MAX_FD_LIMIT=`ulimit -H -n`
90111
if [ $? -eq 0 ] ; then
91112
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -105,10 +126,11 @@ if $darwin; then
105126
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106127
fi
107128

108-
# For Cygwin, switch paths to Windows format before running java
109-
if $cygwin ; then
129+
# For Cygwin or MSYS, switch paths to Windows format before running java
130+
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
110131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
112134
JAVACMD=`cygpath --unix "$JAVACMD"`
113135

114136
# We build the pattern for arguments to be converted via cygpath
@@ -134,27 +156,30 @@ if $cygwin ; then
134156
else
135157
eval `echo args$i`="\"$arg\""
136158
fi
137-
i=$((i+1))
159+
i=`expr $i + 1`
138160
done
139161
case $i in
140-
(0) set -- ;;
141-
(1) set -- "$args0" ;;
142-
(2) set -- "$args0" "$args1" ;;
143-
(3) set -- "$args0" "$args1" "$args2" ;;
144-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
162+
0) set -- ;;
163+
1) set -- "$args0" ;;
164+
2) set -- "$args0" "$args1" ;;
165+
3) set -- "$args0" "$args1" "$args2" ;;
166+
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167+
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168+
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169+
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170+
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171+
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150172
esac
151173
fi
152174

153-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154-
function splitJvmOpts() {
155-
JVM_OPTS=("$@")
175+
# Escape application args
176+
save () {
177+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178+
echo " "
156179
}
157-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
180+
APP_ARGS=`save "$@"`
181+
182+
# Collect all arguments for the java command, following the shell quoting and substitution rules
183+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
159184

160-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
185+
exec "$JAVACMD" "$@"

readium/lcp/gradlew.bat

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -8,20 +24,23 @@
824
@rem Set local scope for the variables with windows NT shell
925
if "%OS%"=="Windows_NT" setlocal
1026

11-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12-
set DEFAULT_JVM_OPTS=
13-
1427
set DIRNAME=%~dp0
1528
if "%DIRNAME%" == "" set DIRNAME=.
1629
set APP_BASE_NAME=%~n0
1730
set APP_HOME=%DIRNAME%
1831

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
35+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37+
1938
@rem Find java.exe
2039
if defined JAVA_HOME goto findJavaFromJavaHome
2140

2241
set JAVA_EXE=java.exe
2342
%JAVA_EXE% -version >NUL 2>&1
24-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
2544

2645
echo.
2746
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +54,7 @@ goto fail
3554
set JAVA_HOME=%JAVA_HOME:"=%
3655
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
3756

38-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
3958

4059
echo.
4160
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,36 +64,16 @@ echo location of your Java installation.
4564

4665
goto fail
4766

48-
:init
49-
@rem Get command-line arguments, handling Windowz variants
50-
51-
if not "%OS%" == "Windows_NT" goto win9xME_args
52-
if "%@eval[2+2]" == "4" goto 4NT_args
53-
54-
:win9xME_args
55-
@rem Slurp the command line arguments.
56-
set CMD_LINE_ARGS=
57-
set _SKIP=2
58-
59-
:win9xME_args_slurp
60-
if "x%~1" == "x" goto execute
61-
62-
set CMD_LINE_ARGS=%*
63-
goto execute
64-
65-
:4NT_args
66-
@rem Get arguments from the 4NT Shell from JP Software
67-
set CMD_LINE_ARGS=%$
68-
6967
:execute
7068
@rem Setup the command line
7169

7270
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7371

72+
7473
@rem Execute Gradle
75-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
7675

77-
:END
76+
:end
7877
@rem End local scope for the variables with windows NT shell
7978
if "%ERRORLEVEL%"=="0" goto mainEnd
8079

readium/lcp/jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk11

readium/lcp/r2-lcp/build.gradle

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
* available in the top-level LICENSE file of the project.
55
*/
66

7-
apply plugin: 'com.android.library'
8-
apply plugin: 'kotlin-android'
9-
apply plugin: 'kotlin-parcelize'
10-
apply plugin: 'com.github.dcendents.android-maven'
7+
plugins {
8+
id 'com.android.library'
9+
id 'kotlin-android'
10+
id 'kotlin-parcelize'
11+
id 'maven-publish'
12+
}
13+
1114
group='com.github.readium'
1215

1316
android {
@@ -35,6 +38,16 @@ android {
3538
}
3639
}
3740

41+
afterEvaluate {
42+
publishing {
43+
publications {
44+
release(MavenPublication) {
45+
from components.release
46+
}
47+
}
48+
}
49+
}
50+
3851
dependencies {
3952
implementation fileTree(include: ['*.jar'], dir: 'libs')
4053
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-native-mt"
@@ -46,9 +59,9 @@ dependencies {
4659
}
4760

4861

49-
implementation "androidx.constraintlayout:constraintlayout:2.0.4"
50-
implementation "androidx.core:core-ktx:1.5.0"
51-
implementation "com.google.android.material:material:1.3.0"
62+
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
63+
implementation 'androidx.core:core-ktx:1.6.0'
64+
implementation 'com.google.android.material:material:1.4.0'
5265
implementation "com.jakewharton.timber:timber:4.7.1"
5366
implementation("com.mcxiaoke.koi:async:0.5.5") {
5467
exclude module: 'support-v4'
@@ -64,6 +77,6 @@ dependencies {
6477
testImplementation "junit:junit:4.13.2"
6578
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
6679

67-
androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0"
68-
androidTestImplementation "androidx.test:runner:1.3.0"
80+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
81+
androidTestImplementation 'androidx.test:runner:1.4.0'
6982
}

0 commit comments

Comments
 (0)