Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove deprecated plugins #458

Merged
merged 2 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions packages/common/src/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ export type MvnBuildCommandType = 'compile' | 'package' | 'install';
export type ImageType = 'jvm' | 'legacy-jar' | 'native' | 'native-micro';
export type GetVersionFunction = (dir: string) => string;

export type MavenPluginType =
| '@jnxplus/nx-maven'
| '@jnxplus/nx-boot-maven'
| '@jnxplus/nx-quarkus-maven';
export type MavenPluginType = '@jnxplus/nx-maven';

export type GradlePluginType =
| '@jnxplus/nx-gradle'
| '@jnxplus/nx-boot-gradle'
| '@jnxplus/nx-quarkus-gradle';
export type GradlePluginType = '@jnxplus/nx-gradle';
25 changes: 5 additions & 20 deletions packages/gradle/src/generators/application/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ function normalizeOptions(
const kotlinExtension = dsl === 'kotlin' ? '.kts' : '';

let qVersion = '';
if (
plugin === '@jnxplus/nx-quarkus-gradle' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
const gradlePropertiesPath = path.join(workspaceRoot, 'gradle.properties');
const gradlePropertiesContent = fs.readFileSync(
gradlePropertiesPath,
Expand Down Expand Up @@ -135,17 +132,11 @@ function addFiles(
tree: Tree,
options: NormalizedSchema
) {
if (
plugin === '@jnxplus/nx-boot-gradle' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
addBootFiles(d, tree, options);
}

if (
plugin === '@jnxplus/nx-quarkus-gradle' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
addQuarkusFiles(d, tree, options);
}

Expand Down Expand Up @@ -416,10 +407,7 @@ export default async function (

const targets = projectConfiguration.targets ?? {};

if (
plugin === '@jnxplus/nx-boot-gradle' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
targets['build'].options = {
...targets['build'].options,
task: normalizedOptions.packaging === 'war' ? 'bootWar' : 'bootJar',
Expand All @@ -439,10 +427,7 @@ export default async function (
};
}

if (
plugin === '@jnxplus/nx-quarkus-gradle' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
targets['build'].options = {
...targets['build'].options,
task: 'quarkusBuild',
Expand Down
15 changes: 3 additions & 12 deletions packages/gradle/src/generators/library/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,11 @@ function addFiles(
tree: Tree,
options: NormalizedSchema
) {
if (
plugin === '@jnxplus/nx-boot-gradle' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
addBootFiles(d, tree, options);
}

if (
plugin === '@jnxplus/nx-quarkus-gradle' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
addQuarkusFiles(d, tree, options);
}

Expand Down Expand Up @@ -342,10 +336,7 @@ export default async function (

const targets = projectConfiguration.targets ?? {};

if (
plugin === '@jnxplus/nx-boot-gradle' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
targets['build'].options = {
...targets['build'].options,
task: 'jar',
Expand Down
25 changes: 5 additions & 20 deletions packages/maven/src/generators/application/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ function normalizeOptions(
const isCustomPort = !!options.port && +options.port !== 8080;

let quarkusVersion = '';
if (
plugin === '@jnxplus/nx-quarkus-maven' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
quarkusVersion =
rootPomXmlContent?.childNamed('properties')?.childNamed('quarkus.version')
?.val || 'quarkusVersion';
Expand Down Expand Up @@ -378,17 +375,11 @@ function addFiles(
tree: Tree,
options: NormalizedSchema
) {
if (
plugin === '@jnxplus/nx-boot-maven' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
addBootFiles(d, tree, options);
}

if (
plugin === '@jnxplus/nx-quarkus-maven' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
addQuarkusFiles(d, tree, options);
}

Expand Down Expand Up @@ -457,10 +448,7 @@ export default async function (

const targets = projectConfiguration.targets ?? {};

if (
plugin === '@jnxplus/nx-boot-maven' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
targets['build'].options = {
...targets['build'].options,
task: 'package spring-boot:repackage -DskipTests=true',
Expand All @@ -480,10 +468,7 @@ export default async function (
};
}

if (
plugin === '@jnxplus/nx-quarkus-maven' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
targets['build-image'] = {
executor: `${plugin}:quarkus-build-image`,
};
Expand Down
10 changes: 2 additions & 8 deletions packages/maven/src/generators/library/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,11 @@ function addFiles(
tree: Tree,
options: NormalizedSchema
) {
if (
plugin === '@jnxplus/nx-boot-maven' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
addBootFiles(d, tree, options);
}

if (
plugin === '@jnxplus/nx-quarkus-maven' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
addQuarkusFiles(d, tree, options);
}

Expand Down
10 changes: 2 additions & 8 deletions packages/maven/src/lib/utils/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,7 @@ export function addMissedProperties(
throw new Error('Properties tag undefined');
}

if (
plugin === '@jnxplus/nx-boot-maven' ||
options.framework === 'spring-boot'
) {
if (options.framework === 'spring-boot') {
const b = isParentPomExits(xmldoc, 'spring-boot-starter-parent');
if (!b) {
const springBootVersion = properties.childNamed('spring.boot.version');
Expand All @@ -198,10 +195,7 @@ export function addMissedProperties(
}
}

if (
plugin === '@jnxplus/nx-quarkus-maven' ||
options.framework === 'quarkus'
) {
if (options.framework === 'quarkus') {
const quarkusVersion = properties.childNamed('quarkus.version');
if (quarkusVersion === undefined) {
properties.children.push(
Expand Down
10 changes: 0 additions & 10 deletions packages/nx-boot-gradle/.babelrc

This file was deleted.

18 changes: 0 additions & 18 deletions packages/nx-boot-gradle/.eslintrc.json

This file was deleted.

Loading
Loading