Skip to content

Commit

Permalink
optimized gradle files
Browse files Browse the repository at this point in the history
  • Loading branch information
rexlManu committed Jun 24, 2021
1 parent 76039e5 commit e6239bf
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 71 deletions.
60 changes: 27 additions & 33 deletions api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
plugins {
id 'java'
}

sourceCompatibility = targetCompatibility = '11'
compileJava.options.encoding = "UTF-8"
apply plugin: 'maven-publish'

group 'eu.miopowered.nickapi'
version 1.0

repositories {
mavenCentral()
maven {
name "spigot-repo"
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name "bungeecord-repo"
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://jitpack.io"
}
maven {
url "https://repo.dmulloy2.net/repository/public/"
}
maven {
name = 'minecraft-repo'
url = 'https://libraries.minecraft.net/'
}
}
dependencies {
implementation('org.projectlombok:lombok:1.18.20')
annotationProcessor('org.projectlombok:lombok:1.18.20')

implementation('org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT')
implementation('com.mojang:authlib:1.5.21');
implementation 'io.netty:netty-all:4.1.44.Final'
implementation('io.netty:netty-all:4.1.44.Final')
}

publishing {
repositories {
maven {
url "https://repo.it-lampe.de/releases"
credentials {
username = lite_user
password = lite_token
}
authentication {
basic(BasicAuthentication)
}
}
}

// implementation(files('../libs/spigot-1.8.8.jar'))
}
publications {
maven(MavenPublication) {
groupId = group
artifactId = 'api'
version = version

from components.java
}
}
}
39 changes: 33 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
group 'eu.miopowered.nickapi'
version '1.0'

repositories {
mavenCentral()
allprojects {
group 'eu.miopowered.nickapi'
version '1.0'
}

dependencies {
subprojects {
apply plugin: 'java'

tasks.withType(JavaCompile) {
targetCompatibility = '11'
sourceCompatibility = '11'
options.encoding = 'UTF-8'
}

repositories {
mavenCentral()

maven {
name "spigot-repo"
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name "bungeecord-repo"
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://jitpack.io"
}
maven {
url "https://repo.dmulloy2.net/repository/public/"
}
maven {
name = 'minecraft-repo'
url = 'https://libraries.minecraft.net/'
}
}
}
34 changes: 2 additions & 32 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,10 @@ import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'java'
}

sourceCompatibility = targetCompatibility = '11'
compileJava.options.encoding = "UTF-8"

group 'eu.miopowered.nickapi'
version 1.0

tasks.build.dependsOn tasks.shadowJar

repositories {
mavenCentral()
maven {
name "spigot-repo"
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name "bungeecord-repo"
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://jitpack.io"
}
maven {
url "https://repo.dmulloy2.net/repository/public/"
}
maven {
name = 'minecraft-repo'
url = 'https://libraries.minecraft.net/'
}
}

processResources {
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [
Expand All @@ -48,8 +19,8 @@ dependencies {
compileOnly('org.projectlombok:lombok:1.18.20')
annotationProcessor('org.projectlombok:lombok:1.18.20')

// implementation('org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT')
compileOnly(files('../libs/spigot-1.8.8.jar'))
compileOnly('org.spigotmc:spigot-api:1.8.8-R0.1-SNAPSHOT')
compileOnly('io.netty:netty-all:4.1.44.Final')
compileOnly('com.mojang:authlib:1.5.21');

implementation(project(':api')) {
Expand All @@ -58,6 +29,5 @@ dependencies {
}

shadowJar {
// configurations = [project.configurations.compile]
archiveName = "nickapi-${rootProject.version}.jar"
}

0 comments on commit e6239bf

Please sign in to comment.