-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: logging filter * fix: Update peer dependencies when migrating Angular or Capacitor * fix: questions on peer check * feat: gradle flavors * feat: support android flavors * chore: bump version
- Loading branch information
1 parent
cb98244
commit 38c5217
Showing
20 changed files
with
277 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { existsSync, readFileSync } from 'fs'; | ||
import { replaceAll } from './utilities'; | ||
|
||
export function gradleToJson(filename: string): any | undefined { | ||
if (!existsSync(filename)) { | ||
return undefined; | ||
} | ||
try { | ||
const lines = readFileSync(filename, 'utf8').split('\n'); | ||
const result = {}; | ||
let at = result; | ||
const stack = [at]; | ||
for (const line of lines) { | ||
if (line.trim().endsWith('{')) { | ||
const key = replaceAll(line, '{', '').trim(); | ||
at[key] = {}; | ||
stack.push(at); | ||
at = at[key]; | ||
} else if (line.trim().endsWith('}')) { | ||
at = stack.pop(); | ||
} else if (line.trim() !== '') { | ||
const kv = line.trim().split(' '); | ||
if (kv.length == 2) { | ||
at[kv[0]] = kv[1]; | ||
} else { | ||
at[kv[0]] = []; | ||
for (let i = 1; i < kv.length; i++) { | ||
at[kv[0]].push(kv[i]); | ||
} | ||
} | ||
} | ||
} | ||
return result; | ||
} catch { | ||
return undefined; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.