Skip to content

Commit

Permalink
Merge pull request #27 from droibit/feature/maven_central
Browse files Browse the repository at this point in the history
Switch library publication to maven central
  • Loading branch information
droibit authored Jan 21, 2025
2 parents 5dd308f + 2a505a2 commit 8b73049
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 51 deletions.
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
# CustomTabsLauncher
[![Android CI](https://github.com/droibit/CustomTabsLauncher/actions/workflows/android.yml/badge.svg)](https://github.com/droibit/CustomTabsLauncher/actions/workflows/android.yml) [![JitPack.io](https://jitpack.io/v/droibit/customtabslauncher.svg)](https://jitpack.io/#droibit/customtabslauncher) [![Software License](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)](https://github.com/droibit/prefbinding/blob/develop/LICENSE)

[![Android CI](https://github.com/droibit/CustomTabsLauncher/actions/workflows/android.yml/badge.svg)](https://github.com/droibit/CustomTabsLauncher/actions/workflows/android.yml)
[![Download](https://img.shields.io/maven-central/v/io.github.droibit/customtabslauncher/3.0.0)](https://central.sonatype.com/artifact/io.github.droibit/customtabslauncher/3.0.0)
[![Software License](https://img.shields.io/badge/license-Apache%202.0-brightgreen.svg)](https://github.com/droibit/prefbinding/blob/develop/LICENSE)

This library makes it easy to launch [Custom Tabs](https://developer.chrome.com/docs/android/custom-tabs) directly from your app.

In some user environments, Custom Tabs may not launch directly. This can happen in the following cases:

- Multiple browser apps are installed on the device.
- The default browser is not Chrome.

Custom Tabs can be displayed as one screen of your app, allowing you to customize the look and feel.
Custom Tabs can be displayed as one screen of your app, allowing you to customize the look and feel.
For this reason, I created this library to make it easier to launch Chrome Custom Tabs directly.

## Download

Add it in your root build.gradle at the end of repositories:

```groovy
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
```

Add the dependency
Add the following dependency to your `build.gradle` file:

```groovy
implementation 'com.github.droibit:customtabslauncher:LATEST_VERSION'
```kotlin
implementation("io.github.droibit:customtabslauncher:LATEST_VERSION")

// Recommended: Declare androidx.browser explicitly as a dependency.
// implementation 'androidx.browser:browser:LATEST_VERSION'
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.maven.publish) apply false
}
19 changes: 18 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ kotlin.code.style=official
android.nonTransitiveRClass=true

# Maven
GROUP=io.github.droibit
VERSION_NAME=3.0.0

SONATYPE_HOST=CENTRAL_PORTAL
SONATYPE_AUTOMATIC_RELEASE=true
RELEASE_SIGNING_ENABLED=true

POM_DESCRIPTION=Library to help the launch of Custom Tabs
POM_URL=https://github.com/droibit/CustomTabsLauncher/
POM_SCM_URL=https://github.com/droibit/CustomTabsLauncher/
POM_SCM_CONNECTION=scm:git:git://github.com/droibit/CustomTabsLauncher.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/droibit/CustomTabsLauncher.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=droibit
POM_DEVELOPER_NAME=Shinya Kumagai
POM_DEVELOPER_URL=https://github.com/droibit/
26 changes: 0 additions & 26 deletions gradle/gradle-mvn-push.gradle.kts

This file was deleted.

3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ truth = { module = "com.google.truth:truth", version = "1.4.4" }
[plugins]
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" }
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Mar 12 09:45:17 JST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 0 additions & 2 deletions jitpack.yml

This file was deleted.

9 changes: 4 additions & 5 deletions launcher/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id("com.android.library")
id("kotlin-android")
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin)
alias(libs.plugins.maven.publish)
}

android {
Expand Down Expand Up @@ -29,6 +30,4 @@ dependencies {
testImplementation(libs.robolectric)
testImplementation(libs.mockk)
testImplementation(libs.truth)
}

apply(from = "$rootDir/gradle/gradle-mvn-push.gradle.kts")
}
2 changes: 2 additions & 0 deletions launcher/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
POM_NAME=CustomTabsLauncher
POM_ARTIFACT_ID=customtabslauncher

0 comments on commit 8b73049

Please sign in to comment.