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 e98ad15
Show file tree
Hide file tree
Showing 2 changed files with 23 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
}
1 change: 1 addition & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
jdk:
- openjdk17
install:
- ./gradlew :IOIOLibCore:build :IOIOLibCore:publishToMavenLocal
- ./gradlew :IOIOLibAndroid:build :IOIOLibAndroid:publishToMavenLocal
- ./gradlew :IOIOLibAndroidBluetooth:build :IOIOLibAndroidBluetooth:publishToMavenLocal
- ./gradlew :IOIOLibAndroidAccessory:build :IOIOLibAndroidAccessory:publishToMavenLocal
Expand Down

0 comments on commit e98ad15

Please sign in to comment.