Skip to content

Commit

Permalink
Merge pull request #16 from marcauberer/dev
Browse files Browse the repository at this point in the history
Release of version 1.0.1
  • Loading branch information
marcauberer authored May 14, 2021
2 parents 2391e87 + b6ca84c commit ae711ea
Show file tree
Hide file tree
Showing 15 changed files with 236 additions and 193 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Workflow for Android CI debug build

name: Android CI

on:
push:
pull_request:
branches: [ main, beta, dev ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Android Build
run: ./gradlew assembleDebug
22 changes: 0 additions & 22 deletions .github/workflows/main.yml

This file was deleted.

57 changes: 33 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
# Workflow for Android CI release

name: Publish to Bintray
name: Publish to Sonatype

on:
release:
types: [ published ]
push:
tags:
- '*'

jobs:
publish:
name: Release build and publish
runs-on: ubuntu-latest

steps:
- name: Checkout code
- name: Check out code
uses: actions/checkout@v2
with:
persist-credentials: false # Avoids messing up PagesDeployAction
- name: Configure JDK
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Make gradlew executable
run: chmod +x gradlew
- name: Publish library
env:
bintrayUser: ${{ secrets.BINTRAY_USERNAME }}
bintrayApiKey: ${{ secrets.BINTRAY_API_KEY }}
run: ./gradlew clean build bintrayUpload dokkaHtml
- name: Deploy Documentation
uses: JamesIves/[email protected]
run: chmod +x ./gradlew

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: adobecolor/build/dokka/html
TARGET_FOLDER: docs
CLEAN: true
distribution: zulu
java-version: 11

- name: Prepare environment
env:
SONATYPE_GPG_FILE_CONTENTS: ${{ secrets.SONATYPE_GPG_FILE_CONTENTS }}
SONATYPE_GPG_FILE: ${{ secrets.SONATYPE_GPG_FILE }}
run: |
git fetch --unshallow
sudo bash -c "echo '$SONATYPE_GPG_FILE_CONTENTS' | base64 -d > '$SONATYPE_GPG_FILE'"
- name: Release build
run: ./gradlew adobecolor:assembleRelease

- name: Publish to MavenCentral
run: ./gradlew adobecolor:publishReleasePublicationToSonatypeRepository -Plibrary_only --no-configure-on-demand --no-parallel dokkaHtml
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
SONATYPE_GPG_KEY: ${{ secrets.SONATYPE_GPG_KEY }}
SONATYPE_GPG_PASS: ${{ secrets.SONATYPE_GPG_PASS }}
SONATYPE_GPG_FILE: ${{ secrets.SONATYPE_GPG_FILE }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ If you want to test the library, please visit the sample app on [Google Play](ht

## Usage
The first step for using this library is, to add it to the dependency section in your project:

Add dependencies to build.gradle file on module level (e.g. app/build.gradle):
```gradle
implementation 'com.chillibits:adobecolortool:1.0.0'
implementation 'com.chillibits:adobecolortool:1.0.1'
```
Also you have to declare a file provider in your manifest, which should look similar to this one:
```xml
Expand Down
139 changes: 11 additions & 128 deletions adobecolor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'com.jfrog.bintray'
id 'maven-publish'
id 'android-maven'
id 'org.jetbrains.dokka'
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 19
targetSdkVersion 30
versionCode library_version_code
versionName library_version
versionCode libraryVersionCode
versionName libraryVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand All @@ -37,20 +34,23 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}

// specify the artifactId as module-name for kotlin
kotlinOptions.freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID]
}

dependencies {
// Base dependencies
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.google.android.material:material:1.3.0'

// External dependencies
implementation 'com.github.florent37:inline-activity-result-kotlin:1.0.4'

// Test dependencies
testImplementation 'junit:junit:4.13.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Expand All @@ -59,123 +59,6 @@ dokkaHtml.configure {
dokkaSourceSets {}
}

ext {
bintrayRepo = 'adobecolortool'

// Name which will be visible on bintray
bintrayName = 'AdobeColorTool'

// Library Details
publishedGroupId = 'com.chillibits'
libraryName = 'Adobe Color Tool'
artifact = 'adobecolortool'
libraryDescription = 'Android library for exporting colors to the Adobe ACO and ASE color formats.'
libraryVersion = library_version

// Repository Links
siteUrl = 'https://github.com/marcauberer/adobe-color-tool'
gitUrl = 'https://github.com/marcauberer/adobe-color-tool.git'
githubRepository= 'marcauberer/adobe-color-tool'

// Developer Details
developerId = 'marcauberer'
developerName = 'Marc Auberer'
developerEmail = '[email protected]'

// License Details
licenseName = 'The MIT License'
licenseUrl = 'https://opensource.org/licenses/MIT'
allLicenses = ["MIT"]
}

group = publishedGroupId

install {
repositories.mavenInstaller {
// Generate pom.xml with proper parameters
pom {
project {
packaging 'aar'

groupId publishedGroupId
artifactId = artifact
name libraryName
description = libraryDescription
url siteUrl

licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}

// Avoid Kotlin docs error
tasks.withType(Javadoc) {
enabled = false
}

// Remove javadoc related tasks
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}

// https://github.com/bintray/gradle-bintray-plugin
bintray {
user = System.getenv("bintrayUser")
key = System.getenv("bintrayApiKey")

configurations = ['archives']
pkg {
repo = bintrayRepo
name = "$publishedGroupId:$artifact"
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
publish = true
publicDownloadNumbers = true
version {
name = libraryVersion
desc = libraryDescription
released = new Date()
vcsTag = libraryVersion
attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
}
}
filesSpec {
from 'adobecolortool/build/outputs/aar/adobecolortool-release.aar'
into '.'
version libraryVersion
}
if (project.hasProperty('pushall') || project.hasProperty('library_only')) {
apply from: '../gradle-release.gradle'
}
8 changes: 8 additions & 0 deletions adobecolor/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# Copyright © Marc Auberer 2021. All rights reserved
#

POM_NAME=Adobe Color Tool
POM_DESCRIPTION=Android library for importing / exporting colors as ACO & ASE files.
POM_ARTIFACT_ID=adobecolortool
POM_PACKAGING=aar
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ plugins {

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "com.chillibits.adobecolorsample"
minSdkVersion 19
targetSdkVersion 30
versionCode library_version_code
versionName library_version
versionCode libraryVersionCode
versionName libraryVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -41,14 +41,14 @@ dependencies {
implementation project(':adobecolor')

// Base dependencies
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'

// Test dependencies
testImplementation 'junit:junit:4.13.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Loading

0 comments on commit ae711ea

Please sign in to comment.