Skip to content

Commit 135d45f

Browse files
committed
build: migrate with open-source-library-migration guide
1 parent d423959 commit 135d45f

File tree

34 files changed

+607
-379
lines changed

34 files changed

+607
-379
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Configure JDK
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: zulu
19+
java-version: '17'
20+
cache: gradle
21+
22+
- name: Validate Gradle Wrapper
23+
uses: gradle/actions/wrapper-validation@v4
24+
25+
- name: Build
26+
run: ./gradlew build
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
env:
9+
RELEASE_SIGNING_ENABLED: true
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
if: github.repository == 'Commit451/Addendum'
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install JDK
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: zulu
24+
java-version: '17'
25+
cache: gradle
26+
27+
- name: Release to Maven Central
28+
run: ./gradlew publishAndReleaseToMavenCentral -PVERSION_NAME="${GITHUB_REF_NAME}" --no-configuration-cache
29+
env:
30+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
31+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
32+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
33+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
# Addendum
22
Useful Kotlin Extensions for the Android SDK and popular Android Libraries
33

4-
[![Build Status](https://travis-ci.org/Commit451/Addendum.svg?branch=master)](https://travis-ci.org/Commit451/Addendum) [![](https://jitpack.io/v/Commit451/Addendum.svg)](https://jitpack.io/#Commit451/Addendum)
4+
[![Build](https://github.com/Commit451/Addendum/actions/workflows/ci.yml/badge.svg)](https://github.com/Commit451/Addendum/actions/workflows/ci.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.commit451/addendum.svg?label=Maven%20Central)](https://central.sonatype.com/search?q=g:com.commit451%20AND%20a:addendum)
55

66
## Gradle Dependency
7-
Add the jitpack url to the project:
8-
```groovy
9-
allprojects {
10-
repositories {
11-
...
12-
maven { url "https://jitpack.io" }
13-
}
14-
}
15-
```
16-
then, in your app `build.gradle`
7+
In your app `build.gradle`:
178
```groovy
189
dependencies {
19-
implementation "com.github.Commit451.Addendum:addendum:latest.version.here"
10+
implementation "com.commit451:addendum:latest.version.here"
2011
//for design support library
21-
implementation "com.github.Commit451.Addendum:addendum-design:latest.version.here"
12+
implementation "com.commit451:addendum-design:latest.version.here"
2213
//for RecyclerView support
23-
implementation "com.github.Commit451.Addendum:addendum-recyclerview:latest.version.here"
14+
implementation "com.commit451:addendum-recyclerview:latest.version.here"
2415
//for Parceler support
25-
implementation "com.github.Commit451.Addendum:addendum-parceler:latest.version.here"
16+
implementation "com.commit451:addendum-parceler:latest.version.here"
2617
//for ThreeTenABP support
27-
implementation "com.github.Commit451.Addendum:addendum-threetenabp:latest.version.here"
18+
implementation "com.commit451:addendum-threetenabp:latest.version.here"
2819
}
2920
```
3021

addendum-design/build.gradle

Lines changed: 0 additions & 20 deletions
This file was deleted.

addendum-design/build.gradle.kts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
2+
import com.vanniktech.maven.publish.SonatypeHost
3+
4+
plugins {
5+
id("com.android.library")
6+
id("com.vanniktech.maven.publish")
7+
}
8+
9+
group = findProperty("GROUP") as String
10+
version = findProperty("VERSION_NAME") as String
11+
12+
android {
13+
namespace = "com.commit451.addendum.design"
14+
compileSdk = rootProject.extra["compileSdkVersion"] as Int
15+
16+
defaultConfig {
17+
minSdk = rootProject.extra["minSdkVersion"] as Int
18+
}
19+
20+
compileOptions {
21+
sourceCompatibility = JavaVersion.VERSION_17
22+
targetCompatibility = JavaVersion.VERSION_17
23+
}
24+
}
25+
26+
dependencies {
27+
api("com.google.android.material:material:1.13.0")
28+
implementation(project(":addendum"))
29+
}
30+
31+
mavenPublishing {
32+
configure(AndroidSingleVariantLibrary("release", true, true))
33+
coordinates("com.commit451", "addendum-design", version.toString())
34+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
35+
if (System.getenv("RELEASE_SIGNING_ENABLED") == "true") {
36+
signAllPublications()
37+
}
38+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<manifest package="com.commit451.addendum.design"/>
1+
<manifest />

addendum-design/src/main/java/com/commit451/addendum/design/Snackbar.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package com.commit451.addendum.design
44

55
import android.widget.TextView
6+
import com.google.android.material.R
67
import com.google.android.material.snackbar.Snackbar
78

89

addendum-parceler/build.gradle

Lines changed: 0 additions & 20 deletions
This file was deleted.

addendum-parceler/build.gradle.kts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
2+
import com.vanniktech.maven.publish.SonatypeHost
3+
4+
plugins {
5+
id("com.android.library")
6+
id("com.vanniktech.maven.publish")
7+
}
8+
9+
group = findProperty("GROUP") as String
10+
version = findProperty("VERSION_NAME") as String
11+
12+
android {
13+
namespace = "com.commit451.addendum.parceler"
14+
compileSdk = rootProject.extra["compileSdkVersion"] as Int
15+
16+
defaultConfig {
17+
minSdk = rootProject.extra["minSdkVersion"] as Int
18+
}
19+
20+
compileOptions {
21+
sourceCompatibility = JavaVersion.VERSION_17
22+
targetCompatibility = JavaVersion.VERSION_17
23+
}
24+
}
25+
26+
dependencies {
27+
api("org.parceler:parceler-api:1.1.13")
28+
implementation(project(":addendum"))
29+
}
30+
31+
mavenPublishing {
32+
configure(AndroidSingleVariantLibrary("release", true, true))
33+
coordinates("com.commit451", "addendum-parceler", version.toString())
34+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
35+
if (System.getenv("RELEASE_SIGNING_ENABLED") == "true") {
36+
signAllPublications()
37+
}
38+
}

0 commit comments

Comments
 (0)