Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.0.5 pull #23

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-MaterialArcMenu-green.svg?style=true)](https://android-arsenal.com/details/1/2936)
[![](https://jitpack.io/v/sashakhail/MaterialArcMenu.svg)](https://jitpack.io/#sashakhail/MaterialArcMenu)

Material Arc Menu
=================
Expand All @@ -24,7 +25,7 @@ Usage
Add a dependency to your `build.gradle`:

dependencies {
compile 'com.sa90.materialarcmenu:library:2.0.0'
implementation 'com.github.sashakhail:MaterialArcMenu:0.1.13'
}

and include the `com.sa90.materialarcmenu.ArcMenu` as a viewgroup (with the sub-menu's as child) in your layout. The menu (floating action button) has a margin of 16dp (customizable) added to it by default to follow the material design guidelines.
Expand Down
30 changes: 27 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
agp_version = '8.8.0'
}
repositories {
google()
jcenter()
mavenLocal()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://nexus.web.cern.ch/nexus/content/repositories/public/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0-rc01'
classpath "com.android.tools.build:gradle:$agp_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'

Expand All @@ -18,7 +26,23 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenLocal()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
maven { url 'https://plugins.gradle.org/m2' }
maven { url 'https://nexus.web.cern.ch/nexus/content/repositories/public/' }
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
# 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
# org.gradle.parallel=true
android.useAndroidX=true
android.enableJetifier=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jul 31 17:23:53 SGT 2019
#Thu Jan 23 18:50:24 PKT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
14 changes: 14 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
jdk:
- openjdk17

android:
build-tools: 35.0.0
compileSdk: 34

build:
before_install:
- echo "Preparing to build the library"
install:
- ./gradlew :library:assembleRelease
script:
- ./gradlew :library:publishToMavenLocal
60 changes: 51 additions & 9 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

android {
compileSdkVersion 29
group = 'com.github.sashakhail' // Your GitHub username
version = '0.1.13' // Version to be published

android {
compileSdkVersion 34
buildToolsVersion "35.0.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "2.0.0"
minSdk 19
targetSdk 35
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -17,9 +20,48 @@ android {
}
}

publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'com.github.sashakhail'
artifactId = 'MaterialArcMenu'
version = project.version

afterEvaluate {
artifact("$buildDir/outputs/aar/library-release.aar")
}

pom {
name.set("MaterialArcMenu")
description.set("An Android custom view which allows you to have an arc-style menu on your pages.")
url.set("https://github.com/sashakhail/MaterialArcMenu")
licenses {
license {
name.set("Apache License 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0")
}
}
developers {
developer {
id.set("sashakhail")
name.set("Sasha Khail")
email.set("[email protected]")
}
}
}
}
}
repositories {
mavenLocal()
}

}
// Ensure publish task depends on bundling the release AAR
tasks.named('publishMavenJavaPublicationToMavenLocal').configure {
dependsOn tasks.named('bundleReleaseAar')
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.material:material:1.12.0'
}

apply from: 'publish.gradle'
76 changes: 0 additions & 76 deletions library/publish.gradle

This file was deleted.

3 changes: 1 addition & 2 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sa90.materialarcmenu">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
6 changes: 3 additions & 3 deletions library/src/main/java/com/sa90/materialarcmenu/ArcMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import androidx.annotation.NonNull;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;

import com.github.sashakhail.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;

import java.util.ArrayList;
Expand Down Expand Up @@ -79,10 +79,10 @@ private void init(TypedArray attr) {
mDrawable = ContextCompat.getDrawable(getContext(), android.R.drawable.ic_dialog_email);
}

mRippleColor = attr.getColor(R.styleable.ArcMenu_menu_ripple_color, getThemeAccentColor(getContext(), R.attr.colorControlHighlight));
mRippleColor = attr.getColor(R.styleable.ArcMenu_menu_ripple_color, getThemeAccentColor(getContext(), androidx.appcompat.R.attr.colorControlHighlight));

if(mColorStateList == null) {
mColorStateList = ColorStateList.valueOf(getThemeAccentColor(getContext(), R.attr.colorAccent));
mColorStateList = ColorStateList.valueOf(getThemeAccentColor(getContext(), androidx.appcompat.R.attr.colorAccent));
}

switch (mMenuSideEnum) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.sa90.materialarcmenu;

import android.annotation.SuppressLint;
import android.view.View;

import androidx.annotation.NonNull;
Expand All @@ -12,6 +13,7 @@
*/
public class MoveUpwardBehaviour extends CoordinatorLayout.Behavior<View> {

@SuppressLint("RestrictedApi")
@Override
public boolean layoutDependsOn(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) {
return dependency instanceof Snackbar.SnackbarLayout;
Expand Down
18 changes: 12 additions & 6 deletions samples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
compileSdk 34

defaultConfig {
applicationId "com.sa90.arcdemo"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
namespace "com.sa90.arcdemo"
minSdkVersion 21
targetSdk 34
versionCode 2
versionName "2.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lint {
baseline = file("lint-baseline.xml")
}

}

dependencies {
implementation project(':library') // Use the library module
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation "androidx.appcompat:appcompat:1.1.0-rc01"
implementation 'com.google.android.material:material:1.0.0'

implementation project(":library")

}
Loading