Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,28 @@
._*
Desktop.ini
Thumbs.db

#eclipse
**/bin
**/.settings
**/.classpath
*.project

#In case people make their workspace in the repo
/eclipse/

#idea
/.idea
/classes
*.iml

#gradle
/build
/.gradle
!gradle/wrapper/*

gradle.properties
!/mdk/gradle.properties

#Public folder
/repo/
97 changes: 97 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
plugins {
id 'org.ajoberstar.grgit' version '3.1.0'
id 'com.github.johnrengelman.shadow' version '5.1.0'
id 'java'
id 'maven'
id 'maven-publish'
id 'eclipse'
}


group = 'org.jbls'
version = gitVersion()
targetCompatibility = sourceCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'

repositories {
mavenCentral()
}

def gitVersion() {
/* If you want to use Tags and automatically have it mark each version as unique based on distance to tag.
def desc = grgit.describe(longDescr: true).split('-') as List
def hash = desc.remove(desc.size() - 1)
def offset = desc.remove(desc.size() - 1)
def tag = desc.join('-')
def branch = grgit.branch.current().name
return "${tag}.${offset}${t -> if (branch != 'master') t << '-' + branch}"
*/
return "3.1-${grgit.head().abbreviatedId}"
}

jar {
manifest.attributes('Main-Class': 'Main')
manifest.attributes('Implementation-Version': project.version)
}
/*
shadowJar {
classifier 'fatjar'
manifest.attributes('Main-Class': 'org.jbls.Main')
manifest.attributes('Implementation-Version': project.version)
}*/
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives jar
//archives shadowJar
archives sourcesJar
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
}

wrapper {
distributionType = Wrapper.DistributionType.BIN
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
//artifact shadowJar

pom {
name = 'JBLS'
description = 'Java Battle.net Logon Server- Java implementation of ValhallaLegend\'s BNLS protocol for interacting with Battle.net classic servers.'
url = 'https://github.com/Davnit/JBLS/'
scm {
url = 'https://github.com/Davnit/JBLS/'
connection = 'scm:git:git://github.com/Davnit/JBLS/.git'
developerConnection = 'scm:git:[email protected]:Davnit/JBLS.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/Davnit/JBLS/issues'
}
}
}
}
repositories {
maven {
if (project.hasProperty('mavenPassword')) {
credentials {
username project.properties.mavenUser
password project.properties.mavenPassword
}
url project.properties.mavenURL
} else {
url 'file://' + rootProject.file('repo').getAbsolutePath()
}
}
}
}
14 changes: 0 additions & 14 deletions build.sh

This file was deleted.

Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
188 changes: 188 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading