Repository navigation
Expand file tree
/
Copy pathandroid-plugin-migrator.d.ts
More file actions
67 lines (59 loc) · 1.81 KB
/
Copy pathandroid-plugin-migrator.d.ts
File metadata and controls
67 lines (59 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { IAndroidToolsInfoData } from "../declarations";
import { IProjectDir } from "../common/declarations";
interface IPluginBuildOptions extends IAndroidBuildOptions {
projectDir?: string;
/**
* File name (without extension) of the built aar and of its temp build dir.
* Defaults to the plugin's short name.
*/
aarName?: string;
}
interface IAndroidBuildOptions {
platformsAndroidDirPath: string;
pluginName: string;
aarOutputDir: string;
tempPluginDirPath: string;
gradlePath?: string;
gradleArgs?: string;
}
interface IAndroidPluginBuildService {
buildAar(options: IPluginBuildOptions): Promise<boolean>;
migrateIncludeGradle(options: IPluginBuildOptions): boolean;
/**
* Whether `buildAar` builds an aar from this platforms/android directory,
* i.e. it has an AndroidManifest.xml or Android source directories.
*/
hasAarSources(platformsAndroidDirPath: string): boolean;
/**
* Whether the plugin has sources to build but `aarOutputDir` lacks its aar
* or still holds one the CLI built under another of its candidate names.
*/
hasOutdatedAar(options: IPluginBuildOptions): boolean;
}
/**
* Describes data required for building plugin for Android.
* The data can be consumed in the buildAndroidPlugin hook.
*/
interface IBuildAndroidPluginData extends Partial<IProjectDir> {
/**
* Directory where the plugin will be build.
* Usually this is the `<project dir>/platforms/tempPlugin/<plugin name>` dir.
*/
pluginDir: string;
/**
* The name of the plugin.
*/
pluginName: string;
/**
* Information about tools that will be used to build the plugin, for example compile SDK version, build tools version, etc.
*/
androidToolsInfo?: IAndroidToolsInfoData;
/**
* Optional custom Gradle path.
*/
gradlePath?: string;
/**
* Optional custom Gradle arguments.
*/
gradleArgs?: string;
}