Skip to content

Commit

Permalink
Remove inspection warnings and fix doc error
Browse files Browse the repository at this point in the history
  • Loading branch information
5peak2me authored and nathan3d committed Jan 27, 2025
1 parent 3cd353c commit a60ba28
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ruler {

### Running the task

Once this is done, `analyze<VariantName>Bundle` tasks will be added for each of your app variants. Running this task will build the app and generate a HTML report, which you can use to analyze your app size. It will also generate a JSON report, in case you want to further process the data.
Once this is done, `analyze<VariantName>Bundle` tasks will be added for each of your app variants. Running this task will build the app and generate an HTML report, which you can use to analyze your app size. It will also generate a JSON report, in case you want to further process the data.

## Ownership

Expand Down Expand Up @@ -133,7 +133,7 @@ The project is set up like a standard Gradle project. You can build it using `./

There is also a sample project, which shows the usage of the plugin. Because the way this sample project is set up, the initial build can fail if you bump the plugin version. To fix this, you have to publish the plugin to your local Maven repository by running `./gradlew publishToMavenLocal -PwithoutSample`.

When working on the frontend, you can start a development server by running `./gradlew browserRun`, which will show a report filled with dummy data to make development easier.
When working on the frontend, you can start a development server by running `./gradlew jsBrowserRun`, which will show a report filled with dummy data to make development easier.

## Compatibility

Expand Down
2 changes: 1 addition & 1 deletion ruler-frontend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
kotlin {
js(IR) {
browser {
commonWebpackConfig (Action {
commonWebpackConfig(Action {
cssSupport {
enabled.set(true)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2021 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.spotify.ruler.plugin

import com.android.build.api.artifact.SingleArtifact
Expand Down Expand Up @@ -63,7 +78,7 @@ internal fun Project.getResourceMappingFile(
variant: ApplicationVariant
): Provider<RegularFile> {
val defaultResourceMappingFile = project.objects.fileProperty() // Empty by default
@Suppress("SpellCheckingInspection")

val resourceMappingFilePath = when {
hasDexGuard(project) -> "outputs/dexguard/mapping/bundle/${variant.name}/resourcefilenamemapping.txt"
else -> return defaultResourceMappingFile // No DexGuard plugin -> use default empty file
Expand All @@ -88,6 +103,5 @@ private fun hasDexGuard(project: Project): Boolean {

/** Checks if the given [project] is using ProGuard for obfuscation, instead of R8. */
private fun hasProGuard(project: Project): Boolean {
@Suppress("SpellCheckingInspection")
return project.pluginManager.hasPlugin("com.guardsquare.proguard")
}
2 changes: 1 addition & 1 deletion sample/lib/src/main/res/layout/activity_lib.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:layout_height="match_parent"
android:paddingVertical="18dp"
android:paddingHorizontal="12dp"
tools:context=".MainActivity">
tools:context=".LibActivity">

<TextView
android:layout_width="wrap_content"
Expand Down

0 comments on commit a60ba28

Please sign in to comment.