Skip to content

Commit

Permalink
Jitpack publish libCore
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 committed Jun 12, 2024
1 parent 33b84f1 commit cbab4fe
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions IOIOLibCore/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'java'
apply plugin: 'maven-publish'

task generateVersionFile(type: GenerateVersion) {
tasks.register('generateVersionFile', GenerateVersion) {
version = versionString
outputFile = file("$project.buildDir/classes/main/version.properties")
}
Expand All @@ -12,12 +13,12 @@ javadoc {
failOnError = false
}

task javadocJar(type: Jar) {
tasks.register('javadocJar', Jar) {
archiveClassifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
tasks.register('sourcesJar', Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
Expand All @@ -41,3 +42,18 @@ class GenerateVersion extends DefaultTask {
properties.store(file.newWriter(), null)
}
}

publishing {
publications {
release(MavenPublication) {
afterEvaluate {
from components.findByName('release')
}
}
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

0 comments on commit cbab4fe

Please sign in to comment.