@nxrocks/common-jvm
Version:
Common library to share code among the JVM-related plugins.
37 lines (36 loc) • 2.92 kB
TypeScript
import { Tree } from '@nx/devkit';
export declare const GRADLE_PLUGINS_REGEX: RegExp;
export declare const SPOTLESS_CONFIG_REGEX: RegExp;
export declare const GRADLE_PLUGIN_REGEX: RegExp;
export declare const SPOTLESS_GRADLE_PLUGIN_ID = "com.diffplug.spotless";
export declare const SPOTLESS_GRADLE_PLUGIN_VERSION = "6.8.0";
export interface GradlePlugin {
id: string;
version?: string;
kotlin?: boolean;
java?: boolean;
applied?: boolean;
}
export declare function getGradlePlugins(content: string): GradlePlugin[];
export declare function hasGradlePlugin(content: string, pluginId: string, pluginVersion?: string): boolean;
export declare function getGradlePlugin(content: string, pluginId: string): GradlePlugin | undefined;
export declare function disableGradlePlugin(tree: Tree, rootFolder: string, language: 'java' | 'kotlin' | 'groovy', pluginId: string, withKotlinDSL?: boolean): boolean;
export declare function addGradlePlugin(tree: Tree, rootFolder: string, language: 'java' | 'kotlin' | 'groovy', pluginId: string, pluginVersion?: string, withKotlinDSL?: boolean): boolean;
export declare function getGradleSpotlessConfig(language: 'java' | 'kotlin' | 'groovy', jdkVersion?: number, baseGitBranch?: string, withKotlinDSL?: boolean): string;
export declare function applySpotlessGradlePlugin(tree: Tree, rootFolder: string, language: 'java' | 'kotlin' | 'groovy', jdkVersion?: number, gitBaseBranch?: string, withKotlinDSL?: boolean): boolean;
export declare function addSpotlessGradlePlugin(tree: Tree, rootFolder: string, language: 'java' | 'kotlin' | 'groovy', jdkVersion?: number, gitBaseBranch?: string, withKotlinDSL?: boolean): boolean;
export declare function hasMultiModuleGradleProjectInTree(tree: Tree, rootFolder: string): boolean;
export declare function hasMultiModuleGradleProject(cwd: string): boolean;
export declare function checkForMultiModuleGradleProject(settings: string): boolean;
export declare function hasGradleModuleInTree(tree: Tree, rootFolder: string, moduleName: string): boolean;
export declare function hasGradleModule(cwd: string, moduleName: string): boolean;
export declare function getGradleModules(cwd: string): string[];
export declare function addGradleModule(tree: Tree, rootFolder: string, moduleName: string, offsetFromRoot: string, withKotlinDSL: boolean): boolean;
export declare function initGradleParentModule(tree: Tree, rootFolder: string, groupId: string, parentModuleName: string, childModuleName: string, offsetFromRoot: string, withKotlinDSL: boolean, helpComment?: string): void;
export declare function getGradleWrapperFiles(): string[];
export declare function hasGradleWrapperInTree(tree: Tree, rootFolder: string): boolean;
export declare function hasGradleWrapper(rootFolder: string): boolean;
export declare function getCoordinatesForGradleProjet(cwd: string): {
groupId?: string | null;
artifactId?: string | null;
};