Skip to content

Commit 2bf1cd6

Browse files
committed
Merge branch 'main' into nav3
* main: (57 commits) Add `scrollableArea` snippet to GesturesSnippets (#703) Compose 1.10: Add snippet to create dynamic shared elements (#711) 🤖 Update Dependencies (#723) Add snippet for dec jxr release. (#722) Add information on accessing the underlying mobile runtime (#720) Adds code for custom rotary (#714) Add snippet for b/454723857 (#716) Add snippet for screenshot test (#710) Improve namespacing and clarity (#705) Snippets for /training/wearables/tiles/get_started?version=3 (#704) Update Snippet to also support L and XL WSC (#702) Fix typo (#701) Add snippets for trigger based profiling section of ProfilingManager docs (#688) Add snippets for /training/wearables/tiles/versioning (#699) Add snippets for /training/wearables/tiles/get_started (#698) Add snippets for /training/wearables/data/{sync,events} (#697) Snippets for /training/wearables/tiles/dynamic (#695) Snippets for /training/wearables/data/data-items (#696) Add snippets for /training/wearables/tiles/debug (#694) Attempt to fix rendering error (#693) ... # Conflicts: # gradle/libs.versions.toml
2 parents b5ca520 + 64af69f commit 2bf1cd6

File tree

214 files changed

+7449
-1197
lines changed

Some content is hidden

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

214 files changed

+7449
-1197
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
name: Build snippets
14+
name: Build iOS snippets
1515

1616
on:
1717
push:

.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: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
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/*
149
.kotlin
1510

1611
### Xcode ###

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

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

compose/recomposehighlighter/src/main/AndroidManifest.xml

Lines changed: 15 additions & 0 deletions
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
<application

0 commit comments

Comments
 (0)