1
+ import kotlin.reflect.full.memberFunctions
2
+
1
3
/*
2
4
* Copyright 2020 Google LLC
3
5
*
17
19
plugins {
18
20
id(" com.android.library" )
19
21
kotlin(" android" )
20
- kotlin(" android.extensions" )
21
22
kotlin(" kapt" )
22
23
id(" dagger.hilt.android.plugin" )
23
24
}
24
25
25
26
android {
26
- compileSdkVersion( Versions .COMPILE_SDK )
27
+ compileSdk = Versions .COMPILE_SDK
27
28
defaultConfig {
28
- minSdkVersion(Versions .MIN_SDK )
29
- targetSdkVersion(Versions .TARGET_SDK )
30
- versionCode = 1
31
- versionName = " 1.0"
29
+ minSdk = Versions .MIN_SDK
30
+ targetSdk = Versions .TARGET_SDK
32
31
testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
33
32
34
- buildConfigField(" String" , " CONFERENCE_TIMEZONE" , properties[" conference_timezone" ] as String )
35
- buildConfigField(" String" , " CONFERENCE_DAY1_START" , properties[" conference_day1_start" ] as String )
36
- buildConfigField(" String" , " CONFERENCE_DAY1_END" , properties[" conference_day1_end" ] as String )
37
- buildConfigField(" String" , " CONFERENCE_DAY2_START" , properties[" conference_day2_start" ] as String )
38
- buildConfigField(" String" , " CONFERENCE_DAY2_END" , properties[" conference_day2_end" ] as String )
39
- buildConfigField(" String" , " CONFERENCE_DAY3_START" , properties[" conference_day3_start" ] as String )
40
- buildConfigField(" String" , " CONFERENCE_DAY3_END" , properties[" conference_day3_end" ] as String )
33
+ buildConfigField(" String" , " CONFERENCE_TIMEZONE" , project. properties[" conference_timezone" ] as String )
34
+ buildConfigField(" String" , " CONFERENCE_DAY1_START" , project. properties[" conference_day1_start" ] as String )
35
+ buildConfigField(" String" , " CONFERENCE_DAY1_END" , project. properties[" conference_day1_end" ] as String )
36
+ buildConfigField(" String" , " CONFERENCE_DAY2_START" , project. properties[" conference_day2_start" ] as String )
37
+ buildConfigField(" String" , " CONFERENCE_DAY2_END" , project. properties[" conference_day2_end" ] as String )
38
+ buildConfigField(" String" , " CONFERENCE_DAY3_START" , project. properties[" conference_day3_start" ] as String )
39
+ buildConfigField(" String" , " CONFERENCE_DAY3_END" , project. properties[" conference_day3_end" ] as String )
41
40
42
- buildConfigField(" String" , " CONFERENCE_DAY1_AFTERHOURS_START" , properties[" conference_day1_afterhours_start" ] as String )
43
- buildConfigField(" String" , " CONFERENCE_DAY2_CONCERT_START" , properties[" conference_day2_concert_start" ] as String )
41
+ buildConfigField(" String" , " CONFERENCE_DAY1_AFTERHOURS_START" , project. properties[" conference_day1_afterhours_start" ] as String )
42
+ buildConfigField(" String" , " CONFERENCE_DAY2_CONCERT_START" , project. properties[" conference_day2_concert_start" ] as String )
44
43
45
44
buildConfigField(
46
45
" String" ,
47
- " BOOTSTRAP_CONF_DATA_FILENAME" , properties[" bootstrap_conference_data_filename" ] as String
46
+ " BOOTSTRAP_CONF_DATA_FILENAME" , project. properties[" bootstrap_conference_data_filename" ] as String
48
47
)
49
48
50
49
buildConfigField(
51
50
" String" ,
52
- " CONFERENCE_WIFI_OFFERING_START" , properties[" conference_wifi_offering_start" ] as String
51
+ " CONFERENCE_WIFI_OFFERING_START" , project. properties[" conference_wifi_offering_start" ] as String
53
52
)
54
53
55
54
consumerProguardFiles(" consumer-proguard-rules.pro" )
@@ -72,17 +71,18 @@ android {
72
71
}
73
72
maybeCreate(" staging" )
74
73
getByName(" staging" ) {
75
- initWith(getByName(" debug" ))
74
+ // TODO: replace with initWith(getByName("debug")) in 7.0.0-beta04
75
+ this ::class .memberFunctions.first { it.name == " initWith" }.call(this , getByName(" debug" ))
76
76
77
77
// Specifies a sorted list of fallback build types that the
78
78
// plugin should try to use when a dependency does not include a
79
79
// "staging" build type.
80
80
// Used with :test-shared, which doesn't have a staging variant.
81
- setMatchingFallbacks( listOf (" debug" ) )
81
+ matchingFallbacks + = listOf (" debug" )
82
82
}
83
83
}
84
84
85
- lintOptions {
85
+ lint {
86
86
disable(" InvalidPackage" , " MissingTranslation" )
87
87
// Version changes are beyond our control, so don't warn. The IDE will still mark these.
88
88
disable(" GradleDependency" )
0 commit comments