mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Create pom
This commit is contained in:
parent
131fd39f63
commit
ced4fed9db
3
.gitignore
vendored
3
.gitignore
vendored
@ -22,4 +22,5 @@ logs/
|
|||||||
lib/
|
lib/
|
||||||
*.bat
|
*.bat
|
||||||
worldedit-bukkit/src/main/java/ignore/*
|
worldedit-bukkit/src/main/java/ignore/*
|
||||||
todo.txt
|
todo.txt
|
||||||
|
mvn/*
|
@ -39,19 +39,20 @@ ext {
|
|||||||
date = git.head().date.format("yy.MM.dd")
|
date = git.head().date.format("yy.MM.dd")
|
||||||
revision = "-${git.head().abbreviatedId}"
|
revision = "-${git.head().abbreviatedId}"
|
||||||
index = 0; // Offset to match CI
|
index = 0; // Offset to match CI
|
||||||
|
parents = git.head().parentIds;
|
||||||
for (; parents != null && !parents.isEmpty(); index++) {
|
for (; parents != null && !parents.isEmpty(); index++) {
|
||||||
commit = git.getResolve().toCommit(parents.get(0));
|
commit = git.getResolve().toCommit(parents.get(0));
|
||||||
parents = commit.getParentIds()
|
parents = commit.getParentIds()
|
||||||
}
|
}
|
||||||
buildNumber = "-${index}"
|
buildNumber = "-${index}"
|
||||||
} catch (Throwable ignore) {
|
} catch (Throwable ignore) {
|
||||||
revision = "unknown";
|
revision = "-unknown"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
version = date + revision + buildNumber
|
version = date + revision + buildNumber
|
||||||
if ( project.hasProperty("lzNoVersion") ) { // gradle build -PlzNoVersion
|
if ( project.hasProperty("lzNoVersion") ) { // gradle build -PlzNoVersion
|
||||||
version = "unknown";
|
version = "unknown"
|
||||||
}
|
}
|
||||||
description = """FastAsyncWorldEdit"""
|
description = """FastAsyncWorldEdit"""
|
||||||
|
|
||||||
@ -67,6 +68,7 @@ subprojects {
|
|||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -43,10 +43,38 @@ processResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar.archiveName="fawe-bukkit-${project.parent.version}.jar"
|
||||||
manifest {
|
jar.destinationDir = file '../mvn/com/boydti/fawe-bukkit/' + project.parent.version
|
||||||
attributes("Class-Path": "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar",
|
task createPom << {
|
||||||
"WorldEdit-Version": version)
|
pom {
|
||||||
|
project {
|
||||||
|
groupId 'com.boydti'
|
||||||
|
artifactId 'fawe-bukkit'
|
||||||
|
version project.parent.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.getEffectivePom()
|
||||||
|
.setDependencies(new ArrayList<>())
|
||||||
|
.writeTo("../mvn/com/boydti/fawe-bukkit/${project.parent.version}/fawe-bukkit-${project.parent.version}.pom")
|
||||||
|
pom {
|
||||||
|
project {
|
||||||
|
groupId 'com.boydti'
|
||||||
|
artifactId 'fawe-bukkit'
|
||||||
|
version 'latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.getEffectivePom()
|
||||||
|
.setDependencies(new ArrayList<>())
|
||||||
|
.writeTo("../mvn/com/boydti/fawe-bukkit/latest/fawe-bukkit-latest.pom")
|
||||||
|
}
|
||||||
|
task copyFiles {
|
||||||
|
doLast {
|
||||||
|
copy {
|
||||||
|
from "../mvn/com/boydti/fawe-bukkit/${project.parent.version}/"
|
||||||
|
into '../mvn/com/boydti/fawe-bukkit/latest/'
|
||||||
|
include('*.jar')
|
||||||
|
rename ("fawe-bukkit-${project.parent.version}.jar", 'fawe-bukkit-latest.jar')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,3 +87,5 @@ shadowJar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build.dependsOn(shadowJar)
|
build.dependsOn(shadowJar)
|
||||||
|
build.finalizedBy(copyFiles)
|
||||||
|
copyFiles.dependsOn(createPom)
|
@ -43,4 +43,41 @@ processResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jar.archiveName="fawe-api-${project.parent.version}.jar"
|
||||||
|
jar.destinationDir = file '../mvn/com/boydti/fawe-api/' + project.parent.version
|
||||||
|
task createPom << {
|
||||||
|
pom {
|
||||||
|
project {
|
||||||
|
groupId 'com.boydti'
|
||||||
|
artifactId 'fawe-api'
|
||||||
|
version project.parent.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.getEffectivePom()
|
||||||
|
.setDependencies(new ArrayList<>())
|
||||||
|
.writeTo("../mvn/com/boydti/fawe-api/${project.parent.version}/fawe-api-${project.parent.version}.pom")
|
||||||
|
pom {
|
||||||
|
project {
|
||||||
|
groupId 'com.boydti'
|
||||||
|
artifactId 'fawe-api'
|
||||||
|
version 'latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.getEffectivePom()
|
||||||
|
.setDependencies(new ArrayList<>())
|
||||||
|
.writeTo("../mvn/com/boydti/fawe-api/latest/fawe-api-latest.pom")
|
||||||
|
}
|
||||||
|
task copyFiles {
|
||||||
|
doLast {
|
||||||
|
copy {
|
||||||
|
from "../mvn/com/boydti/fawe-api/${project.parent.version}/"
|
||||||
|
into '../mvn/com/boydti/fawe-api/latest/'
|
||||||
|
include('*.jar')
|
||||||
|
rename ("fawe-api-${project.parent.version}.jar", 'fawe-api-latest.jar')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
build.dependsOn(shadowJar)
|
build.dependsOn(shadowJar)
|
||||||
|
build.finalizedBy(copyFiles)
|
||||||
|
copyFiles.dependsOn(createPom)
|
||||||
|
Loading…
Reference in New Issue
Block a user