From e98ad15c65582d5d921d6c620f12b68f9491e12e Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Wed, 12 Jun 2024 07:30:12 +0200 Subject: [PATCH] Jitpack publish libCore --- IOIOLibCore/build.gradle | 26 ++++++++++++++++++++++---- jitpack.yml | 1 + 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/IOIOLibCore/build.gradle b/IOIOLibCore/build.gradle index e505ccca..addfb173 100644 --- a/IOIOLibCore/build.gradle +++ b/IOIOLibCore/build.gradle @@ -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") } @@ -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 } @@ -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 +} diff --git a/jitpack.yml b/jitpack.yml index b5fbff1f..39e52bc4 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -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