Skip to content

Commit f3d9103

Browse files
peterInTownclaude
authored andcommitted
[DON-2499] Fix AGP 9.0 compatibility issues for unit tests and build
- Add Robolectric SDK 35 configuration to work around Java 21 requirement for SDK 36 - Create screenshots flavor-specific BackpackDemoTheme to resolve missing class issue - Add screenshots flavor theme resources needed for compilation - Remove broken sourceSets configuration for screenshots flavor Fixes lint check failure, unit test failures, and screenshot test compilation Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 658cab7 commit f3d9103

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

app/build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ android {
7676
}
7777
}
7878

79-
sourceSets {
80-
getByName("screenshots") {
81-
java.directories.add("src/internal/java")
82-
res.directories.add("src/internal/res")
83-
}
84-
}
8579

8680
testOptions {
8781
unitTests {
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Backpack for Android - Skyscanner's Design System
3+
*
4+
* Copyright 2018 - 2026 Skyscanner Ltd
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
package net.skyscanner.backpack.demo
20+
21+
import androidx.compose.runtime.Composable
22+
import androidx.compose.ui.text.font.Font
23+
import androidx.compose.ui.text.font.FontFamily
24+
import androidx.compose.ui.text.font.FontWeight
25+
import net.skyscanner.backpack.compose.theme.BpkTheme
26+
27+
@Composable
28+
fun BackpackDemoTheme(
29+
content: @Composable () -> Unit,
30+
) {
31+
BpkTheme(
32+
fontFamily = FontFamily(
33+
Font(R.font.skyscanner_relative_android_book),
34+
Font(R.font.skyscanner_relative_android_bold, weight = FontWeight.Bold),
35+
),
36+
content = content,
37+
)
38+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<style name="AppThemeBase" parent="BpkTheme">
5+
<item name="android:windowBackground">@color/bpkCanvas</item>
6+
<item name="bpkFontFamilyBase">@font/skyscanner_relative_android_book</item>
7+
<item name="bpkFontFamilyEmphasized">@font/skyscanner_relative_android_bold</item>
8+
<item name="bpkFontFamilyBlack">@font/skyscanner_relative_android_black</item>
9+
10+
<item name="android:lineSpacingMultiplier">1</item>
11+
</style>
12+
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sdk=35

0 commit comments

Comments
 (0)