Skip to content

Commit

Permalink
Added version to jar name & moved jar to build folder
Browse files Browse the repository at this point in the history
  • Loading branch information
faab007nl committed Jan 23, 2024
1 parent 36845b2 commit 55cdcc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ def artifactId = 'GradleBasePlugin'

// Versioning:
// /---> 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 = '4.0.3'
// | /---> Minor Version - Increment this when you add a new feature
// | | /---> Patch Version - Increment this when you make a bug fix
def versionNum = '4.1.0'

group = groupId
version = versionNum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ public void apply(Project project) {
// Registering GradleBasePlugin tasks
project.getTasks().create("generateMetaFiles", GenerateMetaFilesTask.class);

File destinationDir = project.getBuildDir().toPath().resolve("libs").toFile();
File destinationDir = project.getBuildDir().toPath().toFile();
if (!destinationDir.exists()) {
destinationDir.mkdirs();
}

// Setting up Shadow Plugin
project.getPlugins().apply("com.github.johnrengelman.shadow");
getShadowJar(project).getArchiveFileName().set(project.getName() + ".jar");
getShadowJar(project).getArchiveFileName().set(project.getName() + "-" + meta.pluginVersion + ".jar");
getShadowJar(project).getDestinationDirectory().set(destinationDir);
getShadowJar(project).dependsOn("generateMetaFiles");
getShadowJar(project).setProperty("archiveClassifier", "");
Expand Down

0 comments on commit 55cdcc3

Please sign in to comment.