Skip to content

Commit 6734462

Browse files
update gradle files
1 parent ca8fc52 commit 6734462

File tree

75 files changed

+330
-280
lines changed

Some content is hidden

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

75 files changed

+330
-280
lines changed

External-Tutorial-Navigation-Codelab/build.gradle

+4-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ android {
4646
productFlavors {
4747
}
4848

49-
lintOptions {
50-
abortOnError false
51-
}
5249

5350
compileOptions {
5451
sourceCompatibility = 1.8
@@ -58,6 +55,10 @@ android {
5855
kotlinOptions {
5956
jvmTarget = "1.8"
6057
}
58+
namespace 'com.example.android.codelabs.navigation'
59+
lint {
60+
abortOnError false
61+
}
6162

6263
}
6364

External-Tutorial-Navigation-Codelab/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
~ limitations under the License.
1616
-->
1717
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18-
xmlns:tools="http://schemas.android.com/tools"
19-
package="com.example.android.codelabs.navigation">
18+
xmlns:tools="http://schemas.android.com/tools">
2019

2120
<application
2221
android:allowBackup="false"

External-Tutorial-NavigationAdvancedSample/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ android {
3535
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3636
}
3737
}
38+
namespace 'com.example.android.navigationadvancedsample'
3839
}
3940

4041
dependencies {

External-Tutorial-NavigationAdvancedSample/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
-->
1717

1818
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
xmlns:tools="http://schemas.android.com/tools"
20-
package="com.example.android.navigationadvancedsample">
19+
xmlns:tools="http://schemas.android.com/tools">
2120

2221
<application
2322
android:allowBackup="true"

External-Tutorial-NavigationBasicSample/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
apply plugin: 'com.android.application'
1818
apply plugin: 'kotlin-android'
1919
apply plugin: 'kotlin-kapt'
20-
apply plugin: 'kotlin-android-extensions'
20+
2121

2222
android {
2323
compileSdkVersion rootProject.compileSdkVersion
@@ -56,6 +56,7 @@ android {
5656
java.srcDirs += "src/uiTest/java"
5757
}
5858
}
59+
namespace 'com.example.android.navigationsample'
5960
}
6061

6162
dependencies {

External-Tutorial-NavigationBasicSample/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
~ limitations under the License.
1616
-->
1717

18-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19-
package="com.example.android.navigationsample">
18+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2019

2120
<application
2221
android:allowBackup="true"

Tutorial0-0MaterialDesign/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
3+
44
apply plugin: 'kotlin-kapt'
55

66
android {
@@ -39,6 +39,7 @@ android {
3939
dataBinding {
4040
enabled = true
4141
}
42+
namespace 'com.smarttoolfactory.tutorial0_materialdesign'
4243

4344

4445
}

Tutorial0-0MaterialDesign/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="com.smarttoolfactory.tutorial0_materialdesign">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

Tutorial0-1ViewPager2-NestedChildFragment/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
3+
44
apply plugin: 'kotlin-kapt'
55

66
android {
@@ -36,6 +36,7 @@ android {
3636
dataBinding {
3737
enabled = true
3838
}
39+
namespace 'com.smarttoolfactory.tutorial0_1viewpager2'
3940

4041
}
4142

Tutorial0-1ViewPager2-NestedChildFragment/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="com.smarttoolfactory.tutorial0_1viewpager2">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

Tutorial1-1Navigation-NavGraph/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: 'kotlin-android-extensions'
54

65
android {
76
compileSdkVersion rootProject.compileSdkVersion
@@ -30,6 +29,7 @@ android {
3029
kotlinOptions {
3130
jvmTarget = "1.8"
3231
}
32+
namespace 'com.smarttoolfactory.navigationworkmanagerpagination'
3333

3434
}
3535

Tutorial1-1Navigation-NavGraph/src/main/AndroidManifest.xml

+3-3
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="com.smarttoolfactory.navigationworkmanagerpagination">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
@@ -11,7 +10,8 @@
1110
android:theme="@style/AppTheme">
1211
<activity
1312
android:name="com.smarttoolfactory.navigation1navgraph.MainActivity"
14-
android:label="@string/app_name">
13+
android:exported="true"
14+
>
1515
<intent-filter>
1616
<action android:name="android.intent.action.MAIN"/>
1717

Tutorial1-2Navigation-NestedNavGraph/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: 'kotlin-android-extensions'
54

65
android {
76
compileSdkVersion rootProject.compileSdkVersion
@@ -30,6 +29,7 @@ android {
3029
kotlinOptions {
3130
jvmTarget = "1.8"
3231
}
32+
namespace 'com.smarttoolfactory.tutorial1_2navigation_nestednavgraph'
3333

3434
}
3535

Tutorial1-2Navigation-NestedNavGraph/src/main/AndroidManifest.xml

+3-3
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="com.smarttoolfactory.tutorial1_2navigation_nestednavgraph">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
@@ -9,7 +8,8 @@
98
android:roundIcon="@mipmap/ic_launcher_round"
109
android:supportsRtl="true"
1110
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
11+
<activity android:name=".MainActivity"
12+
android:exported="true">
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN" />
1515

Tutorial1-2Navigation-NestedNavGraph/src/main/java/com/smarttoolfactory/tutorial1_2navigation_nestednavgraph/blankfragment/BaseDataBindingFragment.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import androidx.annotation.LayoutRes
99
import androidx.databinding.DataBindingUtil
1010
import androidx.databinding.ViewDataBinding
1111
import androidx.fragment.app.Fragment
12+
import androidx.viewbinding.ViewBinding
1213

1314
/**
1415
* Base fragment with data binding and prints lifecycle events
@@ -27,9 +28,9 @@ import androidx.fragment.app.Fragment
2728
* * onDestroy()
2829
* * onDetach()
2930
*/
30-
abstract class BaseDataBindingFragment<ViewBinding : ViewDataBinding> : Fragment() {
31+
abstract class BaseDataBindingFragment<Binding : ViewBinding> : Fragment() {
3132

32-
lateinit var dataBinding: ViewBinding
33+
lateinit var dataBinding: Binding
3334

3435
@LayoutRes
3536
abstract fun getLayoutRes(): Int

Tutorial1-3Navigation-NestedNavHost/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: 'kotlin-android-extensions'
4+
55

66
android {
77
compileSdkVersion rootProject.compileSdkVersion
@@ -30,6 +30,7 @@ android {
3030
kotlinOptions {
3131
jvmTarget = "1.8"
3232
}
33+
namespace 'com.smarttoolfactory.tutorial1_3navigation_nestednavhost'
3334

3435
}
3536

Tutorial1-3Navigation-NestedNavHost/src/main/AndroidManifest.xml

+3-3
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="com.smarttoolfactory.tutorial1_3navigation_nestednavhost">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"
@@ -9,7 +8,8 @@
98
android:roundIcon="@mipmap/ic_launcher_round"
109
android:supportsRtl="true"
1110
android:theme="@style/AppTheme">
12-
<activity android:name=".MainActivity">
11+
<activity android:name=".MainActivity"
12+
android:exported="true">
1313
<intent-filter>
1414
<action android:name="android.intent.action.MAIN" />
1515

Tutorial1-3Navigation-NestedNavHost/src/main/java/com/smarttoolfactory/tutorial1_3navigation_nestednavhost/blankfragment/BaseDataBindingFragment.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import androidx.annotation.LayoutRes
99
import androidx.databinding.DataBindingUtil
1010
import androidx.databinding.ViewDataBinding
1111
import androidx.fragment.app.Fragment
12+
import androidx.viewbinding.ViewBinding
1213

1314
/**
1415
* Base fragment with data binding and prints lifecycle events
@@ -27,9 +28,9 @@ import androidx.fragment.app.Fragment
2728
* * onDestroy()
2829
* * onDetach()
2930
*/
30-
abstract class BaseDataBindingFragment<ViewBinding : ViewDataBinding> : Fragment() {
31+
abstract class BaseDataBindingFragment<Binding : ViewBinding> : Fragment() {
3132

32-
lateinit var dataBinding: ViewBinding
33+
lateinit var dataBinding: Binding
3334

3435
@LayoutRes
3536
abstract fun getLayoutRes(): Int

Tutorial1-3Navigation-NestedNavHost/src/main/java/com/smarttoolfactory/tutorial1_3navigation_nestednavhost/navhost/HomeNavHostFragment.kt

+4-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ class HomeNavHostFragment : BaseDataBindingFragment<FragmentNavhostHomeBinding>(
8282
is start destination. Set start destination as this fragment so it needs to
8383
navigate next destination.
8484
*/
85-
if (navController!!.currentDestination == null || navController!!.currentDestination!!.id == navController!!.graph.startDestination) {
85+
if (
86+
navController!!.currentDestination == null ||
87+
navController!!.currentDestination!!.id == navController!!.graph.startDestination
88+
) {
8689
navController?.navigate(R.id.homeFragment1)
8790
}
8891

Tutorial2-1Navigation-PassData/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: 'kotlin-android-extensions'
4+
55
apply plugin: 'androidx.navigation.safeargs'
66

77
android {
@@ -37,6 +37,7 @@ android {
3737
dataBinding {
3838
enabled = true
3939
}
40+
namespace 'com.smarttoolfactory.tutorial2_1navigationpassdata'
4041

4142
}
4243

Tutorial2-1Navigation-PassData/src/main/AndroidManifest.xml

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.smarttoolfactory.tutorial2_1navigationpassdata">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
6-
android:allowBackup="true"
7-
android:icon="@mipmap/ic_launcher"
8-
android:label="@string/app_name"
9-
android:roundIcon="@mipmap/ic_launcher_round"
10-
android:supportsRtl="true"
11-
android:theme="@style/AppTheme">
12-
<activity android:name="com.smarttoolfactory.tutorial2_1navigationpassdata.MainActivity">
5+
android:allowBackup="true"
6+
android:icon="@mipmap/ic_launcher"
7+
android:label="@string/app_name"
8+
android:roundIcon="@mipmap/ic_launcher_round"
9+
android:supportsRtl="true"
10+
android:theme="@style/AppTheme">
11+
<activity
12+
android:name="com.smarttoolfactory.tutorial2_1navigationpassdata.MainActivity"
13+
android:exported="true">
1314
<intent-filter>
14-
<action android:name="android.intent.action.MAIN"/>
15+
<action android:name="android.intent.action.MAIN" />
1516

16-
<category android:name="android.intent.category.LAUNCHER"/>
17+
<category android:name="android.intent.category.LAUNCHER" />
1718
</intent-filter>
1819
</activity>
1920
</application>

Tutorial3-1NavigationUI-MenuButtons/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: 'kotlin-android-extensions'
4+
55
android {
66
compileSdkVersion 29
77

@@ -35,6 +35,7 @@ android {
3535
dataBinding {
3636
enabled = true
3737
}
38+
namespace 'com.smarttoolfactory.tutorial3_1navigationui_menu_buttons'
3839

3940
}
4041

Tutorial3-1NavigationUI-MenuButtons/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="com.smarttoolfactory.tutorial3_1navigationui_menu_buttons">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

Tutorial4-1NavigationUI-NavigationView/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: 'kotlin-android-extensions'
4+
55
android {
66
compileSdkVersion 29
77

@@ -35,6 +35,7 @@ android {
3535
dataBinding {
3636
enabled = true
3737
}
38+
namespace 'com.smarttoolfactory.tutorial4_1navigationui_navigationview'
3839

3940
}
4041

Tutorial4-1NavigationUI-NavigationView/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="com.smarttoolfactory.tutorial4_1navigationui_navigationview">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

Tutorial5-1NavigationUI-BottomNavigation/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-kapt'
4-
apply plugin: 'kotlin-android-extensions'
4+
55
android {
66
compileSdkVersion 29
77

@@ -37,6 +37,7 @@ android {
3737
dataBinding {
3838
enabled = true
3939
}
40+
namespace 'com.smarttoolfactory.tutorial5_1navigationui_bottomnavigation'
4041

4142

4243
}

0 commit comments

Comments
 (0)