Skip to content

Commit 9db6bb1

Browse files
authored
Merge pull request #461 from google/update_build_gradle_version_3.2
Merge the androidx to master
2 parents 80cd42e + c3a569f commit 9db6bb1

File tree

59 files changed

+596
-503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+596
-503
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jobs:
33
build:
44
working_directory: ~/code
55
docker:
6-
- image: circleci/android:api-27-alpha
6+
- image: circleci/android:api-28-alpha
77
environment:
88
JVM_OPTS: -Xmx3200m
99
MAX_RETRY: 4

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Add the following dependency to your `build.gradle` file:
1010

1111
```
1212
dependencies {
13-
implementation 'com.google.android:flexbox:1.0.0'
13+
implementation 'com.google.android:flexbox:1.1.0'
1414
}
1515
```
1616

1717
# Usage
18-
There are two ways of using Flexbox in your layout.
18+
There are two ways of using Flexbox in your layout.
1919

20-
## FlexboxLayout
20+
## FlexboxLayout
2121
The first one is `FlexboxLayout` that extends the `ViewGroup` like `LinearLayout` and `RelativeLayout`.
2222
You can specify the attributes from a layout XML like:
2323
```xml

build.gradle

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@
1919
buildscript {
2020
ext {
2121
minSdkVersion = 14
22-
targetSdkVersion = 27
23-
compileSdkVersion = 27
24-
androidGradlePluginVersion = "3.1.3"
22+
targetSdkVersion = 28
23+
compileSdkVersion = 28
24+
25+
androidGradlePluginVersion = "3.2.0"
2526
androidMavenGradlePluginVersion = "1.5"
26-
gradleBintrayPluginVersion = "1.6"
27-
kotlinVersion = "1.2.30"
28-
supportLibVersion = "27.1.0"
29-
espressoVersion = "3.0.0"
30-
testRunnerVersion = "1.0.0"
27+
androidxCoreVersion = "1.0.0"
28+
androidxEspressoVersion = "3.1.0-alpha4"
29+
androidxTestVersion = "1.1.0-alpha4"
3130
junitVersion = "4.12"
31+
gradleBintrayPluginVersion = "1.6"
32+
kotlinVersion = "1.2.70"
33+
materialVersion = "1.0.0"
3234
}
3335

3436
repositories {

demo-cat-gallery/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ android {
2727
versionCode 1
2828
versionName "1.0"
2929

30-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3131
}
3232
buildTypes {
3333
release {
@@ -40,8 +40,8 @@ android {
4040

4141
dependencies {
4242
implementation project(path: ":flexbox")
43-
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
44-
implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
45-
implementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
46-
implementation "org.jetbrains.kotlin:kotlin-stdlib:${rootProject.ext.kotlinVersion}"
43+
implementation "androidx.appcompat:appcompat:${rootProject.androidxCoreVersion}"
44+
implementation "androidx.recyclerview:recyclerview:${rootProject.androidxCoreVersion}"
45+
implementation "com.google.android.material:material:${rootProject.materialVersion}"
46+
implementation "org.jetbrains.kotlin:kotlin-stdlib:${rootProject.kotlinVersion}"
4747
}

demo-cat-gallery/src/main/java/com/google/android/flexbox/apps/catgallery/CatAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
package com.google.android.flexbox.apps.catgallery
1818

19-
import android.support.v7.widget.RecyclerView
2019
import android.view.LayoutInflater
2120
import android.view.ViewGroup
21+
import androidx.recyclerview.widget.RecyclerView
2222

2323
/**
2424
* Adapter class that handles the data set with the {@link RecyclerView.LayoutManager}

demo-cat-gallery/src/main/java/com/google/android/flexbox/apps/catgallery/CatViewHolder.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
package com.google.android.flexbox.apps.catgallery
1818

19-
import android.support.annotation.DrawableRes
20-
import android.support.v7.widget.RecyclerView
2119
import android.view.View
2220
import android.widget.ImageView
21+
import androidx.annotation.DrawableRes
22+
import androidx.recyclerview.widget.RecyclerView
2323
import com.google.android.flexbox.FlexboxLayoutManager
2424

2525
/**

demo-cat-gallery/src/main/java/com/google/android/flexbox/apps/catgallery/MainActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
package com.google.android.flexbox.apps.catgallery
1818

1919
import android.os.Bundle
20-
import android.support.v7.app.AppCompatActivity
21-
import android.support.v7.widget.RecyclerView
22-
import android.support.v7.widget.Toolbar
20+
import androidx.appcompat.app.AppCompatActivity
21+
import androidx.appcompat.widget.Toolbar
22+
import androidx.recyclerview.widget.RecyclerView
2323
import com.google.android.flexbox.AlignItems
2424
import com.google.android.flexbox.FlexDirection
2525
import com.google.android.flexbox.FlexWrap

demo-cat-gallery/src/main/res/layout/activity_main.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
16-
<android.support.design.widget.CoordinatorLayout
16+
<androidx.coordinatorlayout.widget.CoordinatorLayout
1717
xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:app="http://schemas.android.com/apk/res-auto"
1919
xmlns:tools="http://schemas.android.com/tools"
@@ -23,31 +23,31 @@ limitations under the License.
2323
android:fitsSystemWindows="true"
2424
tools:context="com.google.android.flexbox.apps.catgallery.MainActivity">
2525

26-
<android.support.design.widget.AppBarLayout
26+
<com.google.android.material.appbar.AppBarLayout
2727
android:id="@+id/app_bar"
2828
android:layout_width="match_parent"
2929
android:layout_height="@dimen/app_bar_height"
3030
android:fitsSystemWindows="true"
3131
android:theme="@style/AppTheme.AppBarOverlay">
3232

33-
<android.support.design.widget.CollapsingToolbarLayout
33+
<com.google.android.material.appbar.CollapsingToolbarLayout
3434
android:id="@+id/toolbar_layout"
3535
android:layout_width="match_parent"
3636
android:layout_height="match_parent"
3737
android:fitsSystemWindows="true"
3838
app:contentScrim="?attr/colorPrimary"
3939
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
4040

41-
<android.support.v7.widget.Toolbar
41+
<androidx.appcompat.widget.Toolbar
4242
android:id="@+id/toolbar"
4343
android:layout_width="match_parent"
4444
android:layout_height="?attr/actionBarSize"
4545
app:layout_collapseMode="pin"
4646
app:popupTheme="@style/AppTheme.PopupOverlay"/>
4747

48-
</android.support.design.widget.CollapsingToolbarLayout>
49-
</android.support.design.widget.AppBarLayout>
48+
</com.google.android.material.appbar.CollapsingToolbarLayout>
49+
</com.google.android.material.appbar.AppBarLayout>
5050

5151
<include layout="@layout/content_main"/>
5252

53-
</android.support.design.widget.CoordinatorLayout>
53+
</androidx.coordinatorlayout.widget.CoordinatorLayout>

demo-cat-gallery/src/main/res/layout/content_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
16-
<android.support.v7.widget.RecyclerView
16+
<androidx.recyclerview.widget.RecyclerView
1717
xmlns:app="http://schemas.android.com/apk/res-auto"
1818
xmlns:android="http://schemas.android.com/apk/res/android"
1919
app:layout_behavior="@string/appbar_scrolling_view_behavior"

demo-playground/build.gradle

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ android {
2727
versionCode 1
2828
versionName "1.0"
2929

30-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3131
}
3232
buildTypes {
3333
release {
@@ -40,16 +40,17 @@ android {
4040

4141
dependencies {
4242
implementation project(":flexbox")
43-
implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
44-
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
45-
implementation "com.android.support:preference-v7:${rootProject.ext.supportLibVersion}"
46-
implementation "com.android.support:preference-v14:${rootProject.ext.supportLibVersion}"
47-
implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
43+
implementation "androidx.legacy:legacy-support-v4:${rootProject.androidxCoreVersion}"
44+
implementation "androidx.appcompat:appcompat:${rootProject.androidxCoreVersion}"
45+
implementation "androidx.preference:preference:${rootProject.androidxCoreVersion}"
46+
implementation "androidx.legacy:legacy-preference-v14:${rootProject.androidxCoreVersion}"
47+
implementation "com.google.android.material:material:${rootProject.materialVersion}"
4848
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
4949

5050
testImplementation "junit:junit:${rootProject.ext.junitVersion}"
5151

52-
androidTestImplementation "com.android.support:support-annotations:${rootProject.ext.supportLibVersion}"
53-
androidTestImplementation "com.android.support.test:runner:${rootProject.ext.testRunnerVersion}"
54-
androidTestImplementation "com.android.support.test.espresso:espresso-core:${rootProject.ext.espressoVersion}"
52+
androidTestImplementation "androidx.annotation:annotation:${rootProject.androidxCoreVersion}"
53+
androidTestImplementation "androidx.test:runner:${rootProject.androidxTestVersion}"
54+
androidTestImplementation "androidx.test:rules:${rootProject.androidxTestVersion}"
55+
androidTestImplementation "androidx.test.espresso:espresso-core:${rootProject.androidxEspressoVersion}"
5556
}

0 commit comments

Comments
 (0)