Skip to content

Commit 4a7d0bf

Browse files
committed
chore: add compose
1 parent 357887b commit 4a7d0bf

4 files changed

Lines changed: 32 additions & 10 deletions

File tree

JankStatsSample/app/build.gradle

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ android {
88

99
buildFeatures {
1010
viewBinding true
11+
compose true
1112
}
1213

1314
defaultConfig {
@@ -24,6 +25,7 @@ android {
2425
release {
2526
minifyEnabled false
2627
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
28+
signingConfig signingConfigs.debug
2729
}
2830
}
2931
compileOptions {
@@ -33,15 +35,22 @@ android {
3335
kotlinOptions {
3436
jvmTarget = '1.8'
3537
}
38+
composeOptions {
39+
kotlinCompilerExtensionVersion = compose_version
40+
}
3641
}
3742

3843
dependencies {
39-
implementation 'androidx.appcompat:appcompat:1.4.1'
40-
implementation 'androidx.core:core-ktx:1.7.0'
41-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
44+
implementation "androidx.appcompat:appcompat:$activity_version"
45+
implementation "androidx.core:core-ktx:$core_version"
46+
implementation "androidx.constraintlayout:constraintlayout:$constraint_layout_version"
4247
implementation "androidx.metrics:metrics-performance:$jankstats_version"
43-
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1'
44-
implementation 'androidx.navigation:navigation-ui-ktx:2.4.1'
45-
implementation 'androidx.tracing:tracing-ktx:1.0.0'
46-
implementation 'com.google.android.material:material:1.5.0'
48+
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
49+
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
50+
implementation "androidx.tracing:tracing-ktx:$tracing_version"
51+
implementation "com.google.android.material:material:$material_version"
52+
53+
implementation "androidx.compose.ui:ui:$compose_version"
54+
implementation "androidx.compose.material:material:$compose_version"
55+
implementation "androidx.compose.ui:ui-tooling:$compose_version"
4756
}

JankStatsSample/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:supportsRtl="true"
1111
android:theme="@style/Theme.JankStats">
12+
13+
<profileable android:shell="true" />
14+
1215
<activity
1316
android:name=".JankLoggingActivity"
1417
android:exported="true">

JankStatsSample/build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
allprojects {
3-
ext.jankstats_version = '1.0.0-alpha01'
3+
ext {
4+
jankstats_version = '1.0.0-alpha01'
5+
compose_version = '1.1.1'
6+
7+
activity_version = '1.4.1'
8+
core_version = '1.7.0'
9+
constraint_layout_version = '2.1.3'
10+
navigation_version = '2.4.1'
11+
tracing_version = '1.0.0'
12+
material_version = '1.5.0'
13+
}
414

515
repositories {
616
google()
@@ -14,7 +24,7 @@ buildscript {
1424
mavenCentral()
1525
}
1626
dependencies {
17-
classpath "com.android.tools.build:gradle:7.0.4"
27+
classpath 'com.android.tools.build:gradle:7.3.0-alpha07'
1828
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
1929

2030
// NOTE: Do not place your application dependencies here; they belong
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Jan 11 09:20:06 PST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)