-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean output directory before generation
Issue: #279
- Loading branch information
Showing
8 changed files
with
69 additions
and
20 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
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
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
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
33 changes: 33 additions & 0 deletions
33
plugin/src/main/java/com/github/muehmar/gradle/openapi/generator/settings/PackageName.java
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,33 @@ | ||
package com.github.muehmar.gradle.openapi.generator.settings; | ||
|
||
import java.io.File; | ||
import java.io.Serializable; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@EqualsAndHashCode | ||
public class PackageName implements Serializable { | ||
private final String name; | ||
|
||
private PackageName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public static PackageName fromString(String packageName) { | ||
return new PackageName(packageName); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Path asPath() { | ||
return Paths.get(name.replace(".", File.separator).replaceFirst("^" + File.separator, "")); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return name; | ||
} | ||
} |
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
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
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