Skip to content

Commit

Permalink
Merge pull request #386 from ytai/PublishLibCore
Browse files Browse the repository at this point in the history
Jitpack publish libCore
  • Loading branch information
hannesa2 authored Jun 12, 2024
2 parents c55f69a + e98ad15 commit 2e6fe05
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 2e6fe05

Please sign in to comment.