Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added baseline profile module and updated dependencies #1

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
.cxx
local.properties
.idea
app/release
110 changes: 108 additions & 2 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 21 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ plugins {
id 'com.google.devtools.ksp'
id 'kotlin-parcelize'
id 'dev.shreyaspatil.compose-compiler-report-generator'
id 'androidx.baselineprofile'
}

def final debugAppSuffix = ".debug"

android {
experimentalProperties["android.experimental.art-profile-r8-rewriting"] = true
experimentalProperties["android.experimental.r8.dex-startup-optimization"] = true
signingConfigs {
release {
storeFile file('/Users/robinsingh/Keystore')
Expand All @@ -30,6 +33,10 @@ android {
}

buildConfigField("String", "NEWS_FEED_API_KEY", NEWS_FEED_API_KEY)

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
}

buildTypes {
Expand All @@ -43,9 +50,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
benchmark {
signingConfig signingConfigs.debug
initWith(release)
signingConfig = signingConfigs.getByName("debug")
proguardFiles("benchmark-rules.pro")
matchingFallbacks = ['release']
debuggable false
}
}
compileOptions {
Expand All @@ -59,7 +67,7 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.3"
kotlinCompilerExtensionVersion = "1.5.4"
}
packagingOptions {
resources {
Expand All @@ -69,6 +77,12 @@ android {
namespace 'com.rob729.newsfeed'
}

baselineProfile {
dexLayoutOptimization(true)
baselineProfileRulesRewrite(true)
baselineProfileOutputDir = "../../src/main/baselineProfiles"
}

def rootConfiguration = rootProject.ext

dependencies {
Expand All @@ -84,6 +98,7 @@ dependencies {

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
baselineProfile project(':baselineprofile')
debugImplementation "androidx.compose.ui:ui-tooling"
debugImplementation "androidx.compose.ui:ui-test-manifest"
implementation "androidx.navigation:navigation-compose:${rootConfiguration.nav_version}"
Expand All @@ -92,6 +107,7 @@ dependencies {
implementation "androidx.compose.runtime:runtime-tracing:$compose_tracing"

implementation "androidx.lifecycle:lifecycle-viewmodel-compose:${rootConfiguration.compose_viewmodel}"
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"

implementation "io.coil-kt:coil:${rootConfiguration.coil_version}"
implementation "io.coil-kt:coil-compose:${rootConfiguration.coil_version}"
Expand Down Expand Up @@ -130,4 +146,6 @@ dependencies {
debugImplementation "com.plutolib.plugins:bundle-core:${rootConfiguration.pluto}"
benchmarkImplementation "com.plutolib.plugins:bundle-core-no-op:${rootConfiguration.pluto}"
releaseImplementation "com.plutolib.plugins:bundle-core-no-op:${rootConfiguration.pluto}"

implementation "androidx.datastore:datastore-preferences:1.0.0"
}
Binary file removed app/release/app-release.aab
Binary file not shown.
Binary file modified app/release/app-release.apk
Binary file not shown.
19 changes: 18 additions & 1 deletion app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,22 @@
"outputFile": "app-release.apk"
}
],
"elementType": "File"
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/app-release.dm"
]
},
{
"minApi": 31,
"maxApi": 34,
"baselineProfiles": [
"baselineProfiles/0/app-release.dm"
]
}
],
"minSdkVersionForDexing": 24
}
52 changes: 52 additions & 0 deletions app/schemas/com.rob729.newsfeed.database.NewsDatabase/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "20866458d27e519b9d62fabf4e9427b0",
"entities": [
{
"tableName": "news_source_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `news_source_domain` TEXT NOT NULL, `news_article` TEXT NOT NULL, `news_source_fetch_time` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "newsSourceDomain",
"columnName": "news_source_domain",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "newsArticle",
"columnName": "news_article",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "newsSourceFetchTimeInMillis",
"columnName": "news_source_fetch_time",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '20866458d27e519b9d62fabf4e9427b0')"
]
}
}
Loading