Skip to content

Commit

Permalink
Gradle 7.x support - Fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Axolottl authored Jul 11, 2021
1 parent e0188a3 commit ca4e15d
Showing 1 changed file with 37 additions and 39 deletions.
76 changes: 37 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'

repositories {
mavenCentral()
maven {
url "http://mc.hackerzlair.org:8888/repository/public"
allowInsecureProtocol = true
}
maven {
url = "http://repo.extendedclip.com/content/repositories/placeholderapi/"
allowInsecureProtocol = true
}
}

Expand Down Expand Up @@ -37,7 +39,7 @@ dependencies {
}

processResources {

duplicatesStrategy = 'include'
print("Process properties....")
Properties p1=new Properties()
File pf1=new File("$project.projectDir/gradle.properties")
Expand Down Expand Up @@ -71,48 +73,44 @@ compileJava {

doLast {
print("Create POM file....")
pom {
project {
groupId project.group
artifactId project.name
version project.version
}
}.writeTo("./build/libs/"+project.name+"-"+project.version+".xml")
println("Done!")
subprojects {
group = 'com.mythicmobsextension'
task generatePom << { pom { }.writeTo("./build/libs/"+project.name+"-"+project.version+".xml")
println("Done!")}}
}

}

uploadArchives {
doLast {
print("Update repository files....")
def d1=project.projectDir
Properties archiva=new Properties()

File data=new File("${d1}/../usr.properties")
if(data.exists())
{
archiva.load(data.newDataInputStream())
def usr=archiva.getProperty('usr')
def pwd=archiva.getProperty('pwd')

##uploadArchives {
## doLast {
## print("Update repository files....")
## def d1=project.projectDir
## Properties archiva=new Properties()
##
## File data=new File("${d1}/../usr.properties")
## if(data.exists())
## {
## archiva.load(data.newDataInputStream())
## def usr=archiva.getProperty('usr')
## def pwd=archiva.getProperty('pwd')

repositories.mavenDeployer {
repository(url:'http://mc.hackerzlair.org:8888/repository/public/') {
authentication (userName: '${usr}', password: '${pwd}')
}

pom.version=project.version
pom.artifactId=project.name
pom.groupId='com.gmail.berndivader'
}
println("Done!")
}
else
{
println("Archiva config file is missing. Repository not updated!")
}
}
## repositories.mavenDeployer {
## repository(url:'http://mc.hackerzlair.org:8888/repository/public/') {
## authentication (userName: '${usr}', password: '${pwd}')
## }
##
## pom.version=project.version
## pom.artifactId=project.name
## pom.groupId='com.gmail.berndivader'
## }
## println("Done!")
## }
## else
## {
## println("Archiva config file is missing. Repository not updated!")
## }
## }

}
##}

0 comments on commit ca4e15d

Please sign in to comment.