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

Upgrade to new spotless version for all samples #1443

Closed
wants to merge 5 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 1 addition & 31 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false

- name: Upload Crane
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Crane/app/build/outputs/apk/debug/app-debug.apk
asset_name: crane-debug.apk
asset_content_type: application/vnd.android.package-archive

- name: Upload Owl
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Owl/app/build/outputs/apk/debug/app-debug.apk
asset_name: owl-debug.apk
asset_content_type: application/vnd.android.package-archive
prerelease: false

- name: Upload Jetcaster
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -99,13 +79,3 @@ jobs:
asset_path: Jetsnack/app/build/outputs/apk/debug/app-debug.apk
asset_name: jetsnack-debug.apk
asset_content_type: application/vnd.android.package-archive

- name: Upload Jetsurvey
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Jetsurvey/app/build/outputs/apk/debug/app-debug.apk
asset_name: jetsurvey-debug.apk
asset_content_type: application/vnd.android.package-archive
2 changes: 1 addition & 1 deletion .github/workflows/build-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Check formatting
working-directory: ${{ inputs.path }}
run: ./gradlew --init-script buildscripts/init.gradle.kts spotlessCheck --stacktrace
run: ./gradlew spotlessCheck --stacktrace

- name: Check lint
working-directory: ${{ inputs.path }}
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/main.yml

This file was deleted.

9 changes: 9 additions & 0 deletions JetLagged/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*.{kt,kts}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about commenting why we're adding these exceptions? I'm assuming it's so that the different linters / checkers are in sync?

ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL

ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ktlint_standard_property-naming = disabled
ktlint_function_naming_ignore_when_annotated_with = Composable
31 changes: 22 additions & 9 deletions JetLagged/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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
* https://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,
Expand All @@ -14,6 +14,7 @@
* limitations under the License.
*/


plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
Expand All @@ -22,13 +23,22 @@ plugins {
}

android {
compileSdk = libs.versions.compileSdk.get().toInt()
compileSdk =
libs.versions.compileSdk
.get()
.toInt()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit overly optimized, are we sure we want this level of formatting?

namespace = "com.example.jetlagged"

defaultConfig {
applicationId = "com.example.jetlagged"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
minSdk =
libs.versions.minSdk
.get()
.toInt()
targetSdk =
libs.versions.targetSdk
.get()
.toInt()
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -49,22 +59,25 @@ android {

buildTypes {
getByName("debug") {

}

getByName("release") {
isMinifyEnabled = true
signingConfig = signingConfigs.getByName("release")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}

create("benchmark") {
initWith(getByName("release"))
signingConfig = signingConfigs.getByName("release")
matchingFallbacks.add("release")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-benchmark-rules.pro")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-benchmark-rules.pro",
)
isDebuggable = false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import org.junit.Rule
import org.junit.Test

class AppTest {

@get:Rule
val composeTestRule = createComposeRule()

Expand Down
Loading