Sure
TridentSDK build.gradle
:
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "http://repo1.maven.org/maven2" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
//apply plugin: "com.github.hierynomus.license"
group = 'net.tridentsdk'
version = '0.5-SNAPSHOT'
archivesBaseName = "tridentsdk"
description = "TridentSDK"
sourceCompatibility = 1.8
targetCompatibility = 1.8
def ossrhUser = System.getenv("CENTRAL_USER")
def ossrhPassword = System.getenv("CENTRAL_PASS")
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://repo1.maven.org/maven2" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "http://oss.sonatype.org/content/groups/public/" }
maven { url "https://oss.sonatype.org/content/repositories/public/" }
}
dependencies {
compile group: 'org.hjson', name: 'hjson', version: '3.0.0'
compileOnly group: 'org.javassist', name: 'javassist', version: '3.22.0-CR2'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.16.18'
compileOnly group: 'com.esotericsoftware', name: 'reflectasm', version: '1.11.3'
compileOnly group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testCompile group: 'org.openjdk.jmh', name: 'jmh-core', version: '1.19'
testCompile group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: '1.19'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.8.47'
testCompile group: 'org.objenesis', name: 'objenesis', version: '2.6'
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
shadowJar {
classifier = null
}
artifacts {
archives javadocJar, sourcesJar, shadowJar
}
subprojects {
artifacts {
archives javadocJar, sourcesJar, shadowJar
}
test.useTestNG()
}
allprojects {
apply plugin: 'java'
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUser, password: ossrhPassword)
}
pom.project {
name project.name
description project.description
packaging 'jar'
url 'https://tsdk.xyz/'
scm {
connection 'scm:git:git://github.com/TridentSDK/TridentSDK.git'
developerConnection 'scm:git:git@github.com:TridentSDK/TridentSDK.git'
url 'https://github.com/TridentSDK/TridentSDK/tree/master/'
}
licenses {
license {
name 'Apache License 2.0'
url 'https://opensource.org/licenses/Apache-2.0'
distribution 'repo'
}
}
developers {
developer {
name = 'TridentSDK Team'
}
}
}
}
}
}
}
nexusStaging {
username = ossrhUser
password = ossrhPassword
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
check.dependsOn jacocoTestReport
TridentSDK settings.gradle
:
rootProject.name = 'tridentsdk'
Trident build.gradle
:
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "http://repo1.maven.org/maven2" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven-publish'
//apply plugin: "com.github.hierynomus.license"
group = 'net.tridentsdk'
version = '0.5-SNAPSHOT'
archivesBaseName = "trident"
description = "Trident"
sourceCompatibility = 1.8
targetCompatibility = 1.8
def ossrhUser = System.getenv("CENTRAL_USER")
def ossrhPassword = System.getenv("CENTRAL_PASS")
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://repo1.maven.org/maven2" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "http://oss.sonatype.org/content/groups/public/" }
maven { url "https://oss.sonatype.org/content/repositories/public/" }
}
dependencies {
compile group: 'net.tridentsdk', name: 'tridentsdk', version: '0.5-SNAPSHOT'
compile group: 'io.netty', name: 'netty-codec', version: '4.1.13.Final'
compile group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.13.Final', classifier: 'linux-x86_64'
compile group: 'com.esotericsoftware', name: 'reflectasm', version: '1.11.3'
compile group: 'org.javassist', name: 'javassist', version: '3.22.0-CR2'
compile group: 'org.fusesource.jansi', name: 'jansi', version: '1.16'
compile group: 'org.jline', name: 'jline-reader', version: '3.3.1'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.16.18'
compileOnly group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testCompile group: 'org.openjdk.jmh', name: 'jmh-core', version: '1.19'
testCompile group: 'org.openjdk.jmh', name: 'jmh-generator-annprocess', version: '1.19'
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
shadowJar {
classifier = null
}
artifacts {
archives javadocJar, sourcesJar, shadowJar
}
subprojects {
artifacts {
archives javadocJar, sourcesJar, shadowJar
}
test.useTestNG()
}
allprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'jacoco'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUser, password: ossrhPassword)
}
pom.project {
name project.name
description project.description
packaging 'jar'
url 'https://tsdk.xyz/'
scm {
connection 'scm:git:git://github.com/TridentSDK/Trident.git'
developerConnection 'scm:git:git@github.com:TridentSDK/Trident.git'
url 'https://github.com/TridentSDK/Trident/tree/master/'
}
licenses {
license {
name 'Apache License 2.0'
url 'https://opensource.org/licenses/Apache-2.0'
distribution 'repo'
}
}
developers {
developer {
name = 'TridentSDK Team'
}
}
}
}
}
}
}
jar {
manifest {
attributes(
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': 'net.tridentsdk.server.TridentMain'
)
}
}
Trident settings.gradle
rootProject.name = 'trident'