Skip to content

Commit

Permalink
Added full maven publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Litarvan committed Aug 23, 2022
1 parent 5ac5c03 commit 4d63629
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 1,6 @@
.gradle/
.idea/

build/
build/

.DS_Store
31 changes: 31 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 27,24 @@ dependencies {
implementation 'com.google.code.gson:gson:2.9.1'
}

jar {
from 'LICENSE'
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

publishing {
publications {
maven(MavenPublication) {
Expand All @@ -35,6 53,19 @@ publishing {
version = version

from components.java

artifact sourcesJar {
classifier 'sources'
}

artifact javadocJar
}
}


repositories {
maven {
url "$buildDir/repo"
}
}
}

0 comments on commit 4d63629

Please sign in to comment.