14
14
* limitations under the License.
15
15
*/
16
16
17
- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
18
-
19
17
apply plugin : ' com.android.application'
20
18
apply plugin : ' kotlin-android'
21
19
22
- Configuration kotlinPluginConfiguration = configurations. create(" kotlinPlugin" )
23
- tasks. withType(KotlinCompile ). configureEach { compile ->
24
- compile. dependsOn(kotlinPluginConfiguration)
25
- compile. doFirst {
26
- kotlinOptions {
27
- useIR = true
28
- freeCompilerArgs = [
29
- " -Xplugin=${ kotlinPluginConfiguration.files.first()} "
30
- ]
31
- }
32
- }
33
- }
34
-
35
20
android {
36
21
compileSdkVersion 29
37
22
defaultConfig {
@@ -40,7 +25,6 @@ android {
40
25
targetSdkVersion 29
41
26
versionCode 1
42
27
versionName " 1.0"
43
- testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
44
28
}
45
29
buildTypes {
46
30
release {
@@ -57,28 +41,27 @@ android {
57
41
kotlinOptions {
58
42
jvmTarget = " 1.8"
59
43
}
44
+
45
+ buildFeatures {
46
+ compose true
47
+ }
60
48
}
61
49
62
50
configurations {
63
51
ktlint
64
52
}
65
53
66
- dependencies {
67
- // Needed for Compose Kotlin compiler
68
- kotlinPlugin " androidx.compose:compose-compiler:0.1.0-SNAPSHOT"
54
+ ext. compose_version = " 0.1.0-dev02"
69
55
70
- // Actual dependencies of the application
56
+ dependencies {
71
57
implementation (" org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.60-eap-25" )
72
-
73
- implementation (' androidx.compose:compose-runtime:0.1.0-SNAPSHOT' )
74
- implementation (' androidx.ui:ui-framework:0.1.0-SNAPSHOT' )
75
- implementation (' androidx.ui:ui-layout:0.1.0-SNAPSHOT' )
76
- implementation (' androidx.ui:ui-material:0.1.0-SNAPSHOT' )
77
- implementation " androidx.ui:ui-tooling:0.1.0-SNAPSHOT"
78
-
58
+ implementation (" androidx.compose:compose-runtime:$compose_version " )
59
+ implementation (" androidx.ui:ui-framework:$compose_version " )
60
+ implementation (" androidx.ui:ui-layout:$compose_version " )
61
+ implementation (" androidx.ui:ui-material:$compose_version " )
62
+ implementation " androidx.ui:ui-tooling:$compose_version "
79
63
implementation (' androidx.appcompat:appcompat:1.1.0' )
80
64
implementation (' androidx.activity:activity-ktx:1.0.0' )
81
-
82
65
implementation " androidx.core:core-ktx:1.1.0"
83
66
ktlint " com.pinterest:ktlint:0.34.2"
84
67
}
0 commit comments