Skip to content

Commit 771df9f

Browse files
MGaetan89thagikura
authored andcommitted
Update to AndroidX stable (#460)
1 parent fee22cb commit 771df9f

File tree

11 files changed

+63
-58
lines changed

11 files changed

+63
-58
lines changed

build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ buildscript {
2424

2525
androidGradlePluginVersion = "3.2.0-beta04"
2626
androidMavenGradlePluginVersion = "1.5"
27-
androidxCoreVersion = "1.0.0-beta01"
28-
androidxEspressoVersion = "3.1.0-alpha3"
29-
androidxTestVersion = "1.1.0-alpha3"
27+
androidxCoreVersion = "1.0.0"
28+
androidxEspressoVersion = "3.1.0-alpha4"
29+
androidxTestVersion = "1.1.0-alpha4"
3030
junitVersion = "4.12"
3131
gradleBintrayPluginVersion = "1.6"
32-
kotlinVersion = "1.2.51"
33-
materialVersion = "1.0.0-beta01"
34-
testRunnerVersion = "1.0.0"
32+
kotlinVersion = "1.2.70"
33+
materialVersion = "1.0.0"
3534
}
3635

3736
repositories {

demo-playground/src/androidTest/java/com/google/android/apps/flexbox/test/MainActivityTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ import androidx.test.runner.AndroidJUnit4
3333
import com.google.android.apps.flexbox.R
3434
import com.google.android.flexbox.*
3535
import com.google.android.material.navigation.NavigationView
36-
import junit.framework.Assert.*
3736
import org.hamcrest.MatcherAssert.assertThat
3837
import org.hamcrest.core.Is.`is`
38+
import org.junit.Assert.*
3939
import org.junit.Rule
4040
import org.junit.Test
4141
import org.junit.runner.RunWith

flexbox/constants.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ext {
2222

2323
mavenGroup = 'com.google.android'
2424
mavenArtifactId = 'flexbox'
25-
mavenVersion = '1.1.0-beta1'
25+
mavenVersion = '1.1.0'
2626

2727
bintrayOrg = 'google'
2828
}

flexbox/src/androidTest/java/com/google/android/flexbox/FlexboxHelperTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import androidx.test.rule.ActivityTestRule
2121
import androidx.test.runner.AndroidJUnit4
2222
import com.google.android.flexbox.test.FlexboxTestActivity
2323
import com.google.android.flexbox.test.IsEqualAllowingError.Companion.isEqualAllowingError
24-
import junit.framework.Assert.assertEquals
25-
import junit.framework.Assert.assertNotNull
2624
import org.hamcrest.Matchers.`is`
25+
import org.junit.Assert.assertEquals
26+
import org.junit.Assert.assertNotNull
2727
import org.junit.Assert.assertThat
2828
import org.junit.Before
2929
import org.junit.Rule

flexbox/src/androidTest/java/com/google/android/flexbox/test/ConfigChangeActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ConfigChangeActivity : Activity() {
3030
override fun onConfigurationChanged(newConfig: Configuration) {
3131
super.onConfigurationChanged(newConfig)
3232

33-
Log.d(TAG, "onConfigurationChanged: " + newConfig)
33+
Log.d(TAG, "onConfigurationChanged: $newConfig")
3434
}
3535

3636
companion object {

flexbox/src/androidTest/java/com/google/android/flexbox/test/FlexboxAndroidTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ import androidx.test.rule.ActivityTestRule
3434
import androidx.test.runner.AndroidJUnit4
3535
import com.google.android.flexbox.*
3636
import com.google.android.flexbox.test.IsEqualAllowingError.Companion.isEqualAllowingError
37-
import junit.framework.Assert.assertEquals
38-
import junit.framework.Assert.assertTrue
3937
import org.hamcrest.Description
4038
import org.hamcrest.TypeSafeMatcher
4139
import org.hamcrest.core.Is.`is`
4240
import org.hamcrest.core.IsNot.not
41+
import org.junit.Assert.assertEquals
4342
import org.junit.Assert.assertNotNull
4443
import org.junit.Assert.assertThat
44+
import org.junit.Assert.assertTrue
4545
import org.junit.Rule
4646
import org.junit.Test
4747
import org.junit.runner.RunWith
@@ -4015,7 +4015,7 @@ class FlexboxAndroidTest {
40154015
private fun hasWidth(width: Int): ViewAssertion {
40164016
return matches(object : TypeSafeMatcher<View>() {
40174017
override fun describeTo(description: Description) {
4018-
description.appendText("expected width: " + width)
4018+
description.appendText("expected width: $width")
40194019
}
40204020

40214021
override fun describeMismatchSafely(item: View, mismatchDescription: Description) {
@@ -4029,7 +4029,7 @@ class FlexboxAndroidTest {
40294029
private fun hasHeight(height: Int): ViewAssertion {
40304030
return matches(object : TypeSafeMatcher<View>() {
40314031
override fun describeTo(description: Description) {
4032-
description.appendText("expected height: " + height)
4032+
description.appendText("expected height: $height")
40334033
}
40344034

40354035
override fun describeMismatchSafely(item: View, mismatchDescription: Description) {

flexbox/src/androidTest/java/com/google/android/flexbox/test/FlexboxLayoutManagerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ import com.google.android.flexbox.*
3737
import com.google.android.flexbox.FlexboxItemDecoration.HORIZONTAL
3838
import com.google.android.flexbox.FlexboxItemDecoration.VERTICAL
3939
import com.google.android.flexbox.test.IsEqualAllowingError.Companion.isEqualAllowingError
40-
import junit.framework.Assert.assertTrue
4140
import org.hamcrest.Matchers.*
4241
import org.hamcrest.core.IsNot.not
4342
import org.junit.Assert.assertThat
43+
import org.junit.Assert.assertTrue
4444
import org.junit.Rule
4545
import org.junit.Test
4646
import org.junit.runner.RunWith

gradle/wrapper/gradle-wrapper.jar

692 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Jul 19 22:58:08 JST 2018
1+
#Mon Sep 24 09:09:16 CEST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

gradlew

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,43 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
##############################################################################
44
##
55
## Gradle start up script for UN*X
66
##
77
##############################################################################
88

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=""
9+
# Attempt to set APP_HOME
10+
# Resolve links: $0 may be a link
11+
PRG="$0"
12+
# Need this for relative symlinks.
13+
while [ -h "$PRG" ] ; do
14+
ls=`ls -ld "$PRG"`
15+
link=`expr "$ls" : '.*-> \(.*\)$'`
16+
if expr "$link" : '/.*' > /dev/null; then
17+
PRG="$link"
18+
else
19+
PRG=`dirname "$PRG"`"/$link"
20+
fi
21+
done
22+
SAVED="`pwd`"
23+
cd "`dirname \"$PRG\"`/" >/dev/null
24+
APP_HOME="`pwd -P`"
25+
cd "$SAVED" >/dev/null
1126

1227
APP_NAME="Gradle"
1328
APP_BASE_NAME=`basename "$0"`
1429

30+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31+
DEFAULT_JVM_OPTS=""
32+
1533
# Use the maximum available, or set MAX_FD != -1 to use that value.
1634
MAX_FD="maximum"
1735

18-
warn ( ) {
36+
warn () {
1937
echo "$*"
2038
}
2139

22-
die ( ) {
40+
die () {
2341
echo
2442
echo "$*"
2543
echo
@@ -30,6 +48,7 @@ die ( ) {
3048
cygwin=false
3149
msys=false
3250
darwin=false
51+
nonstop=false
3352
case "`uname`" in
3453
CYGWIN* )
3554
cygwin=true
@@ -40,26 +59,11 @@ case "`uname`" in
4059
MINGW* )
4160
msys=true
4261
;;
62+
NONSTOP* )
63+
nonstop=true
64+
;;
4365
esac
4466

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-
6367
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6468

6569
# Determine the Java command to use to start the JVM.
@@ -85,7 +89,7 @@ location of your Java installation."
8589
fi
8690

8791
# Increase the maximum file descriptors if we can.
88-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
92+
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
8993
MAX_FD_LIMIT=`ulimit -H -n`
9094
if [ $? -eq 0 ] ; then
9195
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -150,11 +154,19 @@ if $cygwin ; then
150154
esac
151155
fi
152156

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=("$@")
157+
# Escape application args
158+
save () {
159+
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160+
echo " "
156161
}
157-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
162+
APP_ARGS=$(save "$@")
163+
164+
# Collect all arguments for the java command, following the shell quoting and substitution rules
165+
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166+
167+
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168+
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169+
cd "$(dirname "$0")"
170+
fi
159171

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

0 commit comments

Comments
 (0)