also looking at this
feat(maps): add key-free native Android maps and shared map controls
#363
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.
| @@ -793,6 +793,7 @@ describe('Craft Android builder', () => { | ||
| 793 | 793 | const templates = readdirSync(join(import.meta.dir, '../templates')) |
| 794 | 794 | .filter(name => name.endsWith('.kt.template')) |
| 795 | 795 | const generator = readFileSync(join(import.meta.dir, 'index.ts'), 'utf8') |
| 796 | + readFileSync(join(import.meta.dir, 'native-map.ts'), 'utf8') | |
| 796 | 797 | |
| 797 | 798 | for (const template of templates) expect(generator).toContain(`'${template}'`) |
| 798 | 799 | }) |
| @@ -9,7 +9,7 @@ afterAll(removeAllTempDirs) | ||
| 9 | 9 | describe('native Android map provider generation', () => { |
| 10 | 10 | it('builds a MapLibre host without a Google map SDK dependency or key', async () => { |
| 11 | 11 | 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 } }) | |
| 13 | 13 | const source = readFileSync(join(output, 'app/src/main/java/com/craft/native/MainActivity.kt'), 'utf8') |
| 14 | 14 | const gradle = readFileSync(join(output, 'app/build.gradle.kts'), 'utf8') |
| 15 | 15 | const manifest = readFileSync(join(output, 'app/src/main/AndroidManifest.xml'), 'utf8') |
| @@ -33,7 +33,7 @@ describe('native Android map provider generation', () => { | ||
| 33 | 33 | |
| 34 | 34 | it('keeps the existing Google host when explicitly selected', async () => { |
| 35 | 35 | 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' } }) | |
| 37 | 37 | const source = readFileSync(join(output, 'app/src/main/java/com/craft/native/MainActivity.kt'), 'utf8') |
| 38 | 38 | const gradle = readFileSync(join(output, 'app/build.gradle.kts'), 'utf8') |
| 39 | 39 | const manifest = readFileSync(join(output, 'app/src/main/AndroidManifest.xml'), 'utf8') |