Skip to content

Commit 48691b6

Browse files
garanjcartland
authored andcommitted
Rebase back on main
1 parent 3ea17dd commit 48691b6

File tree

231 files changed

+7723
-1135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+7723
-1135
lines changed

.github/workflows/apply_spotless.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
java-version: '17'
4343

4444
- name: Run spotlessApply
45-
run: ./gradlew spotlessApply --init-script gradle/init.gradle.kts --no-configuration-cache --stacktrace
45+
run: ./gradlew spotlessApply --stacktrace
4646

4747
- name: Auto-commit if spotlessApply has changes
4848
uses: stefanzweifel/git-auto-commit-action@v5

.github/workflows/build-ios.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: Build iOS snippets
15+
16+
on:
17+
push:
18+
branches: [ '*' ]
19+
paths:
20+
- 'kmp/**'
21+
- '.github/workflows/build-ios.yml'
22+
pull_request:
23+
branches: [ '*' ]
24+
paths:
25+
- 'kmp/**'
26+
- '.github/workflows/build-ios.yml'
27+
workflow_dispatch:
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.ref }}-build-ios
30+
cancel-in-progress: true
31+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
32+
jobs:
33+
build_ios:
34+
name: Build iOS app
35+
runs-on: macos-latest
36+
steps:
37+
- uses: maxim-lobanov/setup-xcode@v1
38+
with:
39+
xcode-version: latest-stable
40+
41+
- name: Checkout
42+
uses: actions/checkout@v5
43+
44+
- name: Build iOS app
45+
uses: mxcl/xcodebuild@v3
46+
with:
47+
xcode: ^16
48+
scheme: iosApp
49+
platform: iOS
50+
action: build
51+
working-directory: kmp/iosApp

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
- uses: actions/checkout@v4
3333
with:
3434
token: ${{ secrets.PAT || github.token }}
35-
- name: set up Java 17
35+
- name: set up Java 25
3636
uses: actions/setup-java@v4
3737
with:
3838
distribution: 'zulu'
39-
java-version: '17'
39+
java-version: '25'
4040
- name: Build All
4141
run: ./gradlew build --stacktrace
4242
- name: Build Watch Face Push validation snippets

.gitignore

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
*.iml
22
.gradle
33
/local.properties
4-
/.idea/caches/build_file_checksums.ser
5-
/.idea/libraries
6-
/.idea/modules.xml
7-
/.idea/workspace.xml
4+
.idea/
85
.DS_Store
96
build
107
/captures
118
.externalNativeBuild
12-
.idea/*
13-
/.idea/*
9+
.kotlin
10+
11+
### Xcode ###
12+
## User settings
13+
xcuserdata/
14+
15+
### Xcode Patch ###
16+
*.xcodeproj/*
17+
!*.xcodeproj/project.pbxproj
18+
!*.xcodeproj/xcshareddata/
19+
!*.xcodeproj/project.xcworkspace/
20+
!*.xcworkspace/contents.xcworkspacedata
21+
/*.gcno
22+
**/xcshareddata/WorkspaceSettings.xcsettings

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 113 deletions
This file was deleted.

bluetoothle/src/main/AndroidManifest.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2025 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
217
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
318

419
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
@@ -24,4 +39,4 @@
2439

2540
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
2641
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
27-
</manifest>
42+
</manifest>
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2025 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
217
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
318
xmlns:app="http://schemas.android.com/apk/res-auto"
419
xmlns:tools="http://schemas.android.com/tools"
520
android:layout_width="match_parent"
621
android:layout_height="match_parent"
722
tools:context=".java.MainActivity">
823

9-
</androidx.constraintlayout.widget.ConstraintLayout>
24+
</androidx.constraintlayout.widget.ConstraintLayout>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2025 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
117
<resources></resources>

build.gradle.kts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,96 @@ plugins {
1010
alias(libs.plugins.kotlin.parcelize) apply false
1111
alias(libs.plugins.compose.compiler) apply false
1212
alias(libs.plugins.kotlin.serialization) apply false
13+
alias(libs.plugins.kotlin.multiplatform) apply false
14+
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
15+
alias(libs.plugins.android.lint) apply false
16+
alias(libs.plugins.spotless) apply false
17+
}
18+
19+
allprojects {
20+
apply(plugin = "com.diffplug.spotless")
21+
extensions.configure<com.diffplug.gradle.spotless.SpotlessExtension> {
22+
kotlin {
23+
target("**/*.kt")
24+
targetExclude("**/build/**/*.kt", "spotless/**/*.kt")
25+
26+
val disabledRules = arrayOf(
27+
// These rules were introduced in ktlint 0.46.0 and should not be
28+
// enabled without further discussion. They are disabled for now.
29+
// See: https://github.com/pinterest/ktlint/releases/tag/0.46.0
30+
"filename",
31+
"annotation",
32+
"annotation-spacing",
33+
"argument-list-wrapping",
34+
"double-colon-spacing",
35+
"enum-entry-name-case",
36+
"multiline-if-else",
37+
"no-empty-first-line-in-method-block",
38+
"package-name",
39+
"trailing-comma",
40+
"spacing-around-angle-brackets",
41+
"spacing-between-declarations-with-annotations",
42+
"spacing-between-declarations-with-comments",
43+
"unary-op-spacing",
44+
"no-trailing-spaces",
45+
"max-line-length",
46+
// Disabled rules that were introduced or changed between 0.46.0 ~ 1.50.0
47+
"class-signature",
48+
"trailing-comma-on-call-site",
49+
"trailing-comma-on-declaration-site",
50+
"comment-wrapping",
51+
"function-literal",
52+
"function-signature",
53+
"function-expression-body",
54+
"function-start-of-body-spacing",
55+
"multiline-expression-wrapping",
56+
)
57+
58+
ktlint(libs.versions.ktlint.get()).editorConfigOverride(
59+
mapOf(
60+
"android" to "true",
61+
"ktlint_code_style" to "android_studio",
62+
"ij_kotlin_allow_trailing_comma" to "true",
63+
) + disabledRules.map { Pair("ktlint_standard_$it", "disabled") }
64+
)
65+
66+
// ktlint 7.0.0 introduces lints, which existing snippets do not satisfy
67+
val kotlinSuppressLints = arrayOf(
68+
"standard:function-naming",
69+
"standard:property-naming",
70+
"standard:class-naming",
71+
"standard:max-line-length",
72+
"standard:comment-wrapping",
73+
"standard:import-ordering",
74+
"standard:filename",
75+
"standard:backing-property-naming",
76+
)
77+
for (lint in kotlinSuppressLints) {
78+
suppressLintsFor {
79+
step = "ktlint"
80+
shortCode = lint
81+
}
82+
}
83+
84+
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
85+
}
86+
kotlinGradle {
87+
target("**/*.kts")
88+
targetExclude("**/build/**/*.kts", "spotless/**/*.kts")
89+
// Look for the first line that doesn't have a block comment (assumed to be the license)
90+
licenseHeaderFile(rootProject.file("spotless/copyright.kts"), "(^(?![\\/ ]\\*).*$)")
91+
}
92+
format("xml") {
93+
target("**/*.xml")
94+
targetExclude(
95+
"**/build/**/*.xml",
96+
"spotless/**/*.xml",
97+
".idea/**",
98+
)
99+
// Look for the root tag or a tag that is a snippet
100+
licenseHeaderFile(rootProject.file("spotless/copyright.xml"), "(<[a-zA-Z])|(<!--\\s+(//\\s*)?\\[START)").skipLinesMatching(".*START.*")
101+
}
102+
}
13103
}
14104

15105
apply("${project.rootDir}/buildscripts/toml-updater-config.gradle")

0 commit comments

Comments
 (0)