From 266650f29ee67ecbee37c0daa5f0c595d02cd373 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:04:45 -0600 Subject: [PATCH] feat: Add JitPack configuration for publishing (#4365) --- core/model/build.gradle.kts | 6 +++--- core/proto/build.gradle.kts | 1 - gradle/publishing.gradle.kts | 36 ++++++++++++++++-------------------- jitpack.yml | 6 ++++++ 4 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 jitpack.yml diff --git a/core/model/build.gradle.kts b/core/model/build.gradle.kts index 045132519..74ea92458 100644 --- a/core/model/build.gradle.kts +++ b/core/model/build.gradle.kts @@ -46,10 +46,10 @@ configure { } dependencies { - implementation(projects.core.proto) + api(projects.core.proto) - implementation(libs.androidx.annotation) - implementation(libs.kotlinx.serialization.json) + api(libs.androidx.annotation) + api(libs.kotlinx.serialization.json) implementation(libs.kermit) implementation(libs.zxing.android.embedded) { isTransitive = false } implementation(libs.zxing.core) diff --git a/core/proto/build.gradle.kts b/core/proto/build.gradle.kts index 1e20691a2..e904a9ea4 100644 --- a/core/proto/build.gradle.kts +++ b/core/proto/build.gradle.kts @@ -34,7 +34,6 @@ import com.android.build.api.dsl.LibraryExtension */ plugins { alias(libs.plugins.meshtastic.android.library) - alias(libs.plugins.meshtastic.android.library.compose) alias(libs.plugins.protobuf) `maven-publish` } diff --git a/gradle/publishing.gradle.kts b/gradle/publishing.gradle.kts index d8199b685..6fe834ee8 100644 --- a/gradle/publishing.gradle.kts +++ b/gradle/publishing.gradle.kts @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2025-2026 Meshtastic LLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ import java.io.FileInputStream import java.util.Properties @@ -14,23 +30,3 @@ val appVersion = System.getenv("VERSION_NAME") ?: versionBase project.version = appVersion project.group = "org.meshtastic" - -val GITHUB_ACTOR = System.getenv("GITHUB_ACTOR") -val GITHUB_TOKEN = System.getenv("GITHUB_TOKEN") - -if (!GITHUB_ACTOR.isNullOrEmpty() && !GITHUB_TOKEN.isNullOrEmpty()) { - configure { - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/meshtastic/Meshtastic-Android") - credentials { - username = GITHUB_ACTOR - password = GITHUB_TOKEN - } - } - } - } -} else { - println("Skipping GitHub Packages repository configuration: GITHUB_ACTOR or GITHUB_TOKEN not set.") -} diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 000000000..3c56a24ee --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,6 @@ +jdk: + - openjdk21 +before_install: + - ./gradlew :core:proto:generateGoogleReleaseProto +install: + - ./gradlew publishToMavenLocal -Pgoogle