| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- import type { UTSResult } from '@dcloudio/uts';
- import { CompilerServer, ToKotlinOptions } from './utils';
- import { Module } from '../types/types';
- import { APP_PLATFORM } from './manifest/utils';
- export interface KotlinCompilerServer extends CompilerServer {
- getKotlincHome(): string;
- getDefaultJar(arg?: any): string[];
- compile(options: {
- kotlinc: string[];
- d8: string[];
- }, projectPath: string): Promise<boolean>;
- checkDependencies?: (configJsonPath: string) => Promise<{
- code: number;
- msg: string;
- data: string[];
- }>;
- checkRResources?: (resDir: string) => Promise<{
- code: number;
- msg: string;
- data: {
- jarPath: string;
- uniModuleName: string;
- };
- }>;
- }
- export declare function createKotlinResolveTypeReferenceName(_namespace: string, _ast: Module): (name: string) => string;
- export declare function runKotlinProd(filename: string, components: Record<string, string>, { isPlugin, isX, extApis, }: {
- isPlugin: boolean;
- isX: boolean;
- extApis?: Record<string, [string, string]>;
- }): Promise<void>;
- export type RunKotlinDevResult = UTSResult & {
- type: 'kotlin';
- changed: string[];
- };
- interface RunKotlinDevOptions {
- components: Record<string, string>;
- isX: boolean;
- isPlugin: boolean;
- cacheDir: string;
- pluginRelativeDir: string;
- is_uni_modules: boolean;
- extApis?: Record<string, [string, string]>;
- }
- export declare function runKotlinDev(filename: string, { components, isX, isPlugin, cacheDir, pluginRelativeDir, is_uni_modules, extApis, }: RunKotlinDevOptions): Promise<RunKotlinDevResult | undefined>;
- export declare function resolveAndroidDepFiles(filename: string): string[];
- export declare function compile(filename: string, { inputDir, outputDir, sourceMap, components, isX, isPlugin, extApis, }: ToKotlinOptions): Promise<UTSResult | undefined>;
- export declare function resolveKotlincArgs(filename: string, dest: string, kotlinc: string, jars: string[]): string[];
- export declare function resolveD8Args(filename: string): string[];
- export declare function resolveDexFile(jarFile: string): string;
- export declare function resolveJarPath(platform: APP_PLATFORM, cacheDir: string, pluginRelativeDir: string, filename: string): string;
- export declare function checkAndroidVersionTips(pluginId: string, pluginDir: string, is_uni_modules: boolean): string | undefined;
- export declare function getUniModulesCacheJars(cacheDir: string): string[];
- export declare function getUniModulesJars(outputDir: string): string[];
- export {};
|