ReviewOS

also looking at this

craft-native/craft

feat(maps): add key-free native Android maps and shared map controls

#363
Merged chris wants to merge codex/wildloop-native-map-providers into main
28 files +1857 -481

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

packages/android/src/index.test.tsmodified+1-0
Changes to packages/android/src/index.test.ts
@@ -793,6 +793,7 @@ describe('Craft Android builder', () => {
793793 const templates = readdirSync(join(import.meta.dir, '../templates'))
794794 .filter(name => name.endsWith('.kt.template'))
795795 const generator = readFileSync(join(import.meta.dir, 'index.ts'), 'utf8')
796 + readFileSync(join(import.meta.dir, 'native-map.ts'), 'utf8')
796797
797798 for (const template of templates) expect(generator).toContain(`'${template}'`)
798799 })
packages/android/src/native-map.test.tsmodified+2-2
Changes to packages/android/src/native-map.test.ts
@@ -9,7 +9,7 @@ afterAll(removeAllTempDirs)
99describe('native Android map provider generation', () => {
1010 it('builds a MapLibre host without a Google map SDK dependency or key', async () => {
1111 const output = createTempDir('craft-native-maplibre-')
12 await init({ name: 'Native maps', output, runtimeDir: null, config: { renderer: 'native', mapProvider: 'maplibre', enableGeolocation: true } })
12 await init({ name: 'Native maps', packageName: 'com.craft.native', output, runtimeDir: null, config: { renderer: 'native', mapProvider: 'maplibre', enableGeolocation: true } })
1313 const source = readFileSync(join(output, 'app/src/main/java/com/craft/native/MainActivity.kt'), 'utf8')
1414 const gradle = readFileSync(join(output, 'app/build.gradle.kts'), 'utf8')
1515 const manifest = readFileSync(join(output, 'app/src/main/AndroidManifest.xml'), 'utf8')
@@ -33,7 +33,7 @@ describe('native Android map provider generation', () => {
3333
3434 it('keeps the existing Google host when explicitly selected', async () => {
3535 const output = createTempDir('craft-native-google-map-')
36 await init({ name: 'Google maps', output, runtimeDir: null, config: { renderer: 'native', mapProvider: 'google', mapsApiKey: 'restricted-fixture-key' } })
36 await init({ name: 'Google maps', packageName: 'com.craft.native', output, runtimeDir: null, config: { renderer: 'native', mapProvider: 'google', mapsApiKey: 'restricted-fixture-key' } })
3737 const source = readFileSync(join(output, 'app/src/main/java/com/craft/native/MainActivity.kt'), 'utf8')
3838 const gradle = readFileSync(join(output, 'app/build.gradle.kts'), 'utf8')
3939 const manifest = readFileSync(join(output, 'app/src/main/AndroidManifest.xml'), 'utf8')