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 575ed10
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions IOIOLibCore/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apply plugin: 'java'
plugins {
id 'java'
id 'maven-publish'
}

task generateVersionFile(type: GenerateVersion) {
tasks.register('generateVersionFile', GenerateVersion) {
version = versionString
outputFile = file("$project.buildDir/classes/main/version.properties")
}
Expand All @@ -12,12 +15,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 +44,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 575ed10

Please sign in to comment.