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
24 changes: 20 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
name: Build
on: [pull_request, push]

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Build the app
- name: Checkout
uses: actions/checkout@v4

- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '17'
cache: gradle

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4

- name: Build
run: ./gradlew build
33 changes: 33 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Release

on:
push:
tags:
- '*'

env:
RELEASE_SIGNING_ENABLED: true

jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'Commit451/QuickActionView'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '17'
cache: gradle

- name: Release to Maven Central
run: ./gradlew publishAndReleaseToMavenCentral -PVERSION_NAME="${GITHUB_REF_NAME}" --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
# QuickActionView
View that shows quick actions when long pressed, inspired by Pinterest

[![Build Status](https://travis-ci.org/Commit451/QuickActionView.svg?branch=master)](https://travis-ci.org/Commit451/QuickActionView) [![](https://jitpack.io/v/Commit451/QuickActionView.svg)](https://jitpack.io/#Commit451/QuickActionView)
[![Build](https://github.com/Commit451/QuickActionView/actions/workflows/ci.yml/badge.svg)](https://github.com/Commit451/QuickActionView/actions/workflows/ci.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.commit451/quickactionview.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.commit451/quickactionview)

![Sample Gif](https://raw.githubusercontent.com/Commit451/QuickActionView/master/screenshots/qav.gif)
![Sample Gif](https://raw.githubusercontent.com/Commit451/QuickActionView/main/screenshots/qav.gif)

# Gradle Dependency

Add this in your root `build.gradle` file (**not** your module `build.gradle` file):
Add the library to your project `build.gradle`:

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

Then, add the library to your project `build.gradle`
```gradle
dependencies {
compile 'com.github.Commit451:QuickActionView:latest.release.here'
implementation("com.commit451:quickactionview:latest.release.here")
}
```

Expand Down
32 changes: 0 additions & 32 deletions app/build.gradle

This file was deleted.

40 changes: 40 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
plugins {
id("com.android.application")
}

android {
namespace = "com.commit451.quickactionview.sample"
compileSdk = 35

defaultConfig {
applicationId = "com.commit451.quickactionview.sample"
minSdk = 21
targetSdk = 35
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.7.1")
implementation("com.google.android.material:material:1.13.0")
implementation("androidx.recyclerview:recyclerview:1.4.0")

implementation(project(":quickactionview"))
}
7 changes: 2 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.commit451.quickactionview.sample">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand All @@ -21,9 +20,7 @@

</activity>

<activity android:name=".RecyclerViewActivity">

</activity>
<activity android:name=".RecyclerViewActivity" />

</application>

Expand Down
23 changes: 0 additions & 23 deletions build.gradle

This file was deleted.

9 changes: 9 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
id("com.android.application") version "9.1.0" apply false
id("com.android.library") version "9.1.0" apply false
id("com.vanniktech.maven.publish") version "0.30.0" apply false
}

tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
38 changes: 22 additions & 16 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# Project-wide Gradle settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
GROUP=com.commit451
POM_ARTIFACT_ID=quickactionview
VERSION_NAME=2.0.1

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
POM_NAME=QuickActionView
POM_DESCRIPTION=View that shows quick actions when long pressed, inspired by Pinterest
POM_INCEPTION_YEAR=2020
POM_URL=https://github.com/Commit451/QuickActionView/

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
POM_LICENSE_NAME=The Apache Software License, Version 2.0
POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENSE_DIST=repo

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
POM_SCM_URL=https://github.com/Commit451/QuickActionView/
POM_SCM_CONNECTION=scm:git:git://github.com/Commit451/QuickActionView.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/Commit451/QuickActionView.git

POM_DEVELOPER_ID=Commit451
POM_DEVELOPER_NAME=Commit 451
POM_DEVELOPER_URL=https://github.com/Commit451/

SONATYPE_CONNECT_TIMEOUT_SECONDS=60
SONATYPE_CLOSE_TIMEOUT_SECONDS=900
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
27 changes: 0 additions & 27 deletions quickactionview/build.gradle

This file was deleted.

53 changes: 53 additions & 0 deletions quickactionview/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
import com.vanniktech.maven.publish.SonatypeHost

plugins {
id("com.android.library")
id("com.vanniktech.maven.publish")
}

group = findProperty("GROUP") as String
version = findProperty("VERSION_NAME") as String

android {
namespace = "com.commit451.quickactionview"
compileSdk = 35

defaultConfig {
minSdk = 21
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}

dependencies {
api("androidx.appcompat:appcompat:1.7.1")
}

mavenPublishing {
configure(
AndroidSingleVariantLibrary(
variant = "release",
sourcesJar = true,
publishJavadocJar = true,
)
)
coordinates("com.commit451", "quickactionview", version.toString())
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
if (System.getenv("RELEASE_SIGNING_ENABLED") == "true") {
signAllPublications()
}
}
6 changes: 1 addition & 5 deletions quickactionview/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
<manifest package="com.commit451.quickactionview">

<application />

</manifest>
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Action
* Configuration for the [Action] which controls the visuals.
*/
class Config constructor(context: Context) {
internal var backgroundColorStateList: ColorStateList = ColorStateList.valueOf(ColorUtils.getThemeAttrColor(context, R.attr.colorAccent))
internal var backgroundColorStateList: ColorStateList = ColorStateList.valueOf(ColorUtils.getThemeAttrColor(context, androidx.appcompat.R.attr.colorAccent))
internal var textColor: Int = Color.WHITE
@DrawableRes
internal var textBackgroundDrawable: Int = R.drawable.qav_text_background
Expand Down
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

18 changes: 18 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "QuickActionView"
include(":app", ":quickactionview")