diff --git a/api/build.gradle b/api/build.gradle index e898698..bcc9b14 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -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')) -} \ No newline at end of file + publications { + maven(MavenPublication) { + groupId = group + artifactId = 'api' + version = version + + from components.java + } + } +} diff --git a/build.gradle b/build.gradle index 85915fa..f0e032e 100644 --- a/build.gradle +++ b/build.gradle @@ -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/' + } + } } \ No newline at end of file diff --git a/plugin/build.gradle b/plugin/build.gradle index da33d72..a4baab2 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -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: [ @@ -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')) { @@ -58,6 +29,5 @@ dependencies { } shadowJar { -// configurations = [project.configurations.compile] archiveName = "nickapi-${rootProject.version}.jar" } \ No newline at end of file