Skip to content

Commit

Permalink
Removed plugin.properties copy from ResourceManager
Browse files Browse the repository at this point in the history
  • Loading branch information
faab007nl committed Dec 16, 2023
1 parent ce6e85f commit e4f9f45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def artifactId = 'GradleBasePlugin'
// /---> Major Version - Increment this when you make a breaking change
// | /---> Patch Version - Increment this when you add a new feature
// | | /---> Minor Version - Increment this when you make a bug fix
def versionNum = '2.3.1'
def versionNum = '2.3.2'

group = groupId
version = versionNum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public static void createWorkflow(Project project, boolean isApi) throws IOExcep
}

InputStream src = ResourceManager.class.getResourceAsStream(workflowFile);
if(src == null) throw new IOException("Workflow file not found in resources");

Files.copy(src, Paths.get(destination.toURI()), StandardCopyOption.REPLACE_EXISTING);
}

Expand All @@ -77,14 +79,9 @@ public static void createGradleFiles(Project project) throws IOException {
buildGradleDestination.mkdirs();

InputStream buildGradleSrc = ResourceManager.class.getResourceAsStream("/gradle/build.gradle");
Files.copy(buildGradleSrc, Paths.get(buildGradleDestination.toURI()), StandardCopyOption.REPLACE_EXISTING);
if(buildGradleSrc == null) throw new IOException("build.gradle file not found in resources");

// plugin.properties
File pluginPropertiesDestination = new File(project.getProjectDir().getAbsolutePath() + "/plugin.properties");
pluginPropertiesDestination.mkdirs();

InputStream pluginPropertiesSrc = ResourceManager.class.getResourceAsStream("/gradle/plugin.properties");
Files.copy(pluginPropertiesSrc, Paths.get(pluginPropertiesDestination.toURI()), StandardCopyOption.REPLACE_EXISTING);
Files.copy(buildGradleSrc, Paths.get(buildGradleDestination.toURI()), StandardCopyOption.REPLACE_EXISTING);
}

}
23 changes: 0 additions & 23 deletions src/main/resources/gradle/plugin.properties

This file was deleted.

0 comments on commit e4f9f45

Please sign in to comment.