-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
869 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/lib |
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,2 @@ | ||
/src | ||
/tsconfig.json |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
{ | ||
"name": "@btfuse/cordova-android", | ||
"version": "0.0.0", | ||
"description": "Fuse Android platform for the Cordova Runtime", | ||
"main": "lib/api.js", | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "[email protected]", | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@types/elementtree": "^0.1.5", | ||
"@types/node": "^22.10.7", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.7.3" | ||
}, | ||
"dependencies": { | ||
"elementtree": "^0.1.7" | ||
} | ||
} |
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,81 @@ | ||
|
||
import { | ||
ConfigParser, | ||
CordovaEventEmitter, | ||
ICreatePlatformOptions | ||
} from '../../types/cordova'; | ||
|
||
const VERSION: string = '0.0.0'; | ||
|
||
export = class API { | ||
public platform: string; | ||
public root: string; | ||
|
||
public constructor(platform: unknown, platformRootDir: string, events: unknown) { | ||
this.platform = 'fuse-android'; | ||
this.root = platformRootDir; | ||
} | ||
|
||
public getPlatformInfo(): unknown { | ||
return { | ||
locations: null, | ||
root: this.root, | ||
name: this.platform, | ||
version: VERSION, | ||
projectConfig: null | ||
}; | ||
} | ||
|
||
public async prepare(project: unknown, options: unknown): Promise<unknown> { | ||
console.log('PREPARE', project, options); | ||
return; | ||
} | ||
|
||
public async addPlugin(plugin: unknown, options: unknown): Promise<unknown> { | ||
console.log('ADD PLUGIN', plugin, options); | ||
return; | ||
} | ||
|
||
public async removePlugin(plugin: unknown, options: unknown): Promise<unknown> { | ||
console.log('REMOVE PLUGIN', plugin, options); | ||
return; | ||
} | ||
|
||
public async build(options: unknown): Promise<unknown> { | ||
console.log('BUILD', options); | ||
return; | ||
} | ||
|
||
public async run(options: unknown): Promise<unknown> { | ||
console.log('RUN', options); | ||
return; | ||
} | ||
|
||
public async listTargets(options: unknown): Promise<unknown> { | ||
console.log('LIST TARGETS', options); | ||
return; | ||
} | ||
|
||
public async clean(options: unknown): Promise<unknown> { | ||
console.log('CLEAN', options); | ||
return; | ||
} | ||
|
||
public async requirements(): Promise<unknown> { | ||
console.log('REQUIREMENTS'); | ||
return; | ||
} | ||
|
||
public static async createPlatform(destination: string, config: ConfigParser, options: ICreatePlatformOptions, events: CordovaEventEmitter): Promise<API> { | ||
console.log('CREATE PLATFORM', destination, config, options, events); | ||
return new API(null, destination, events); | ||
} | ||
|
||
public static updatePlatform(destination: string, options: unknown, events: unknown): API { | ||
return new API(null, destination, events); | ||
} | ||
|
||
public static version(): string { | ||
return VERSION; | ||
} | ||
} |
Oops, something went wrong.