Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ multidex = "1.0.3"

permissionx = "1.8.1"
triplet-play = "3.12.1"
vanniktech-maven-publish = "0.30.0"

[libraries]
android-build-tools-gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle-android" }
Expand All @@ -40,4 +41,5 @@ hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt-andr
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-kapt = { id = "kotlin-kapt" }
kotlin-parcelize = { id = "kotlin-parcelize" }
triplet-play = { id = 'com.github.triplet.play', version.ref = "triplet-play" }
triplet-play = { id = 'com.github.triplet.play', version.ref = "triplet-play" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech-maven-publish" }
43 changes: 41 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
id 'com.android.library'
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.vanniktech.maven.publish)
}

apply from: "${project.rootDir}/buildsystem/android-defaults.gradle"

final int versionMajor = 1
final int versionMajor = 2
final int versionMinor = 0
final int versionPatch = 0
final int androidVersionCode = 5

final String semanticVersion = "${versionMajor}.${versionMinor}.${versionPatch}"

def project_name = "Bluetooth LE Libarary (Android)"
def project_description = "Allows for easy access to a Bluetooth LE device's AdRecord and RSSI value"
def github_owner_and_repo = "alt236/Bluetooth-LE-Library---Android"
def group_id = 'dev.alt236'
def artifact_id = 'bluetooth-le-library-android'
def artifact_version = semanticVersion

repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -46,3 +55,33 @@ android {
}
}

mavenPublishing { // This is for the 'vanniktech-maven-publish' plugin
var automaticRelease = false
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease)
signAllPublications()

coordinates(group_id, artifact_id, artifact_version)
pom {
name = project_name
description = project_description
url = "https://github.com/$github_owner_and_repo"
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = 'alt236'
name = 'Alexandros Schillings'
url = "https://github.com/alt236/"
}
}
scm {
url = "https://github.com/$github_owner_and_repo"
}
}
}