Skip to content

Commit

Permalink
Publish 1.5.0 to Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
azabost committed Jun 24, 2024
1 parent b1af12f commit 93fe6fc
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 114 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![](https://jitpack.io/v/bright/kequality.svg)](https://jitpack.io/#bright/kequality)
![build](https://github.com/bright/kequality/actions/workflows/build.yml/badge.svg?branch=master)

# kequality #

Expand All @@ -16,21 +16,21 @@ See [Usage examples](#usage-examples) below.

## Installation ##

First, add JitPack to your repositories block in Gradle build script.
First, make sure you have Maven Central in your repositories:

```gradle
repositories {
maven("https://jitpack.io")
mavenCentral()
}
```

Then, declare the dependency like:
```gradle
// Base kequality features
implementation("com.github.bright.kequality:kequality:1.4.0")
implementation("dev.bright.kequality:kequality:1.5.0")
// Android's RecyclerView DiffUtil integration
implementation("com.github.bright.kequality:diffutil:1.4.0")
implementation("dev.bright.kequality:diffutil:1.5.0")
```

## Usage examples ##
Expand Down
4 changes: 0 additions & 4 deletions androidBenchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.dev.bright.android.library)
alias(libs.plugins.android.benchmark)
Expand Down Expand Up @@ -48,8 +46,6 @@ android {

dependencies {
implementation(projects.kequality)
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib)
testImplementation(libs.kotlin.test)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.shouldko)
Expand Down
2 changes: 0 additions & 2 deletions androidBenchmark/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
kotlin.code.style=official
android.useAndroidX=true
android.enableAdditionalTestOutput=true
1 change: 0 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ repositories {
dependencies {
implementation(libs.kotlin.gradlePlugin)
implementation(libs.android.gradlePlugin)
//implementation(libs.gradleMavenPublishPlugin)
}

gradlePlugin {
Expand Down
3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import org.gradle.api.JavaVersion
//import org.jetbrains.kotlin.gradle.dsl.JvmTarget

object Config {
const val group = "pl.brightinventions.kequality"
const val version = "1.4.0"
/**
* Since Gradle 8.8 a toolchain can also be set for the Gradle daemon (with some limitations)
* See [the docs](https://docs.gradle.org/8.8/userguide/gradle_daemon.html#sec:daemon_jvm_criteria) for more info
Expand Down
15 changes: 0 additions & 15 deletions buildSrc/src/main/kotlin/Dependencies.kt

This file was deleted.

3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/Repositories.kt

This file was deleted.

9 changes: 0 additions & 9 deletions buildSrc/src/main/kotlin/Versions.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
Expand Down
11 changes: 0 additions & 11 deletions buildSrc/src/main/kotlin/default-java-publish.gradle.kts

This file was deleted.

3 changes: 0 additions & 3 deletions buildSrc/src/main/kotlin/default-kotlin-library.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ plugins {
id("org.jetbrains.kotlin.jvm")
}

group = Config.group
version = Config.version

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(Config.jvmToolchain))
Expand Down
28 changes: 2 additions & 26 deletions diffutil/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.dev.bright.android.library)
//alias(libs.plugins.publish)
`maven-publish`
alias(libs.plugins.maven.publish)
}

android {
namespace = "pl.brightinventions.kequality.diffutil"

defaultConfig {
minSdk = 1
compileSdk = 34
Expand All @@ -22,29 +19,8 @@ android {

dependencies {
api(projects.kequality)
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib)
implementation(libs.androidx.recyclerview)
testImplementation(libs.kotlin.test)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.shouldko)
}

afterEvaluate {
publishing {
publications {
register<MavenPublication>("release") {
from(components["release"])
groupId = Config.group
artifactId = "diffutil"
version = Config.version
}
register<MavenPublication>("debug") {
from(components["debug"])
groupId = Config.group
artifactId = "diffutil-debug"
version = Config.version
}
}
}
}
5 changes: 3 additions & 2 deletions diffutil/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
kotlin.code.style=official
android.useAndroidX=true
POM_ARTIFACT_ID=diffutil
POM_NAME=Android DiffUtil adapter
POM_DESCRIPTION=Equality adapter for Andriod DiffUtil. Removes the typical DiffUtil boilerplate.
25 changes: 23 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xmx5g
org.gradle.parallel=true
android.useAndroidX=true

kotlin.code.style=official
android.useAndroidX=true

GROUP=dev.bright.kequality
VERSION_NAME=1.5.0

POM_URL=https://github.com/bright/kequality/

POM_LICENSE_NAME=MIT License
POM_LICENSE_URL=https://opensource.org/license/mit
POM_LICENSE_DIST=repo

POM_SCM_URL=https://github.com/bright/kequality/
POM_SCM_CONNECTION=scm:git:git://github.com/bright/kequality.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://github.com:bright/kequality.git

POM_DEVELOPER_ID=bright
POM_DEVELOPER_NAME=Bright Inventions
POM_DEVELOPER_URL=https://github.com/bright/

SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true
29 changes: 13 additions & 16 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
[versions]
kotlin = "1.9.24"
gradleMavenPublishPlugin = "0.28.0"
androidGradlePlugin = "8.5.0"
gradleMavenPublishPlugin = "0.29.0"
androidBenchmark = "1.2.4"
androidTestExtJunit = "1.1.3"
androidTestRunner = "1.4.0"
recyclerView = "1.3.2"
shouldko = "0.2.2"

[libraries]
# Plugins treated as libraries for buildSrc
android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" }

kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }

kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerView" }
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidTestRunner" }
androidx-test-ext-junit = { module = "androidx.test.ext:junit", version.ref = "androidTestExtJunit" }

androidx-benchmark = { module = "androidx.benchmark:benchmark-junit4", version.ref = "androidBenchmark" }
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version = "1.3.2" }

kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }

gradleMavenPublishPlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradleMavenPublishPlugin" }
androidx-test-runner = { module = "androidx.test:runner", version = "1.4.0" }
androidx-test-ext-junit = { module = "androidx.test.ext:junit", version = "1.1.3" }

shouldko = { module = "com.github.miensol:shouldko", version.ref = "shouldko" }
shouldko = { module = "com.github.miensol:shouldko", version = "0.2.2" }

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm" }
kotlin-android = { id = "org.jetbrains.kotlin.android" }
android-library = { id = "com.android.library" }
android-benchmark = { id = "androidx.benchmark", version.ref = "androidBenchmark" }
publish = { id = "com.vanniktech.maven.publish", version.ref = "gradleMavenPublishPlugin" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "gradleMavenPublishPlugin" }

# From buildSrc
dev-bright-android-library = { id = "dev.bright.android.library" }
dev-bright-kotlin-library = { id = "dev.bright.kotlin.library" }
12 changes: 1 addition & 11 deletions kequality/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlin.jvm)
id("default-java-publish")
alias(libs.plugins.maven.publish)
alias(libs.plugins.dev.bright.kotlin.library)
}


java {
withJavadocJar()
withSourcesJar()
}

dependencies {
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlin.stdlib)
testImplementation(libs.kotlin.test)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.shouldko)
Expand Down
3 changes: 3 additions & 0 deletions kequality/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_ARTIFACT_ID=kequality
POM_NAME=kequality
POM_DESCRIPTION=A custom equality checking utility

0 comments on commit 93fe6fc

Please sign in to comment.