Skip to content

Commit

Permalink
Updated buildscript
Browse files Browse the repository at this point in the history
Now publishes sources jar to local maven using newer 'maven-publish' plugin. Fixes an issue with IDEA's download sources when installing the library locally.
  • Loading branch information
Maowcraft authored and Maowcraft committed Mar 29, 2021
1 parent c9f261c commit 403ebd1
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java'
id 'maven'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -12,4 +12,20 @@ version = '1.0.0'

dependencies {
compile files("${System.properties['java.home']}/../lib/tools.jar")
}

task sourceJar(type: Jar) {
from sourceSets.main.allJava
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java

artifact sourceJar {
classifier "sources"
}
}
}
}

0 comments on commit 403ebd1

Please sign in to comment.