Skip to content

Commit

Permalink
Merge pull request #41 from marcauberer/dev
Browse files Browse the repository at this point in the history
Release of version 1.0.3
  • Loading branch information
marcauberer authored Sep 21, 2021
2 parents e7dc008 + fb8da62 commit 656a221
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 38 deletions.
17 changes: 0 additions & 17 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

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.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The first step for using this library is, to add it to the dependency section in

Add dependencies to build.gradle file on module level (e.g. app/build.gradle):
```gradle
implementation 'com.chillibits:adobecolortool:1.0.2'
implementation 'com.chillibits:adobecolortool:1.0.3'
```
Also you have to declare a file provider in your manifest, which should look similar to this one:
```xml
Expand Down
4 changes: 2 additions & 2 deletions adobecolor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ACOBinaryGenerator {
result += 0.to2Bytes() // z = 0 (Has a value on other color spaces than RGB)
result += 0.to2Bytes() // 0 (constant)
result += (name.length +1).to2Bytes() // Name length
for (c in name) result += c.toInt().to2Bytes() // Name
for (c in name) result += c.code.to2Bytes() // Name
result += 0.to2Bytes() // 0 (constant)
return result
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ASEBinaryGenerator {
var result = BlockType.GROUP_START.value.to2Bytes() // Block type
result += blockLength.to4Bytes() // Block length
result += nameLength.to2Bytes() // Name length
for (c in name) result += c.toInt().to2Bytes() // Group name
for (c in name) result += c.code.to2Bytes() // Group name
result += ByteArray(2) // Group name ending
return result
}
Expand Down Expand Up @@ -97,7 +97,7 @@ class ASEBinaryGenerator {
var result = BlockType.COLOR.value.to2Bytes() // Block type
result += blockLength.to4Bytes() // Block length
result += nameLength.to2Bytes() // Name length
for (c in name) result += c.toInt().to2Bytes() // Color name
for (c in name) result += c.code.to2Bytes() // Color name
result += ByteArray(1)
result += colorModel // Color model
result += (color.red / 255f).to4Bytes() // Color value red
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
package com.chillibits.adobecolor.parser

import android.graphics.Color
import android.util.Log
import com.chillibits.adobecolor.generator.ACOBinaryGenerator
import com.chillibits.adobecolor.model.AdobeColor
import com.chillibits.adobecolor.tool.from2Bytes
import java.nio.charset.Charset

/**
* More information here:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package com.chillibits.adobecolor.parser

import android.graphics.Color
import android.util.Log
import com.chillibits.adobecolor.generator.ASEBinaryGenerator
import com.chillibits.adobecolor.model.AdobeColor
import com.chillibits.adobecolor.tool.from2Bytes
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
Expand All @@ -46,7 +46,7 @@ dependencies {
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'

// Test dependencies
testImplementation 'junit:junit:4.13.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import android.content.pm.PackageManager
import android.graphics.Color
import android.net.Uri
import android.os.Bundle
import android.provider.SyncStateContract
import android.util.Log
import android.view.Menu
import android.view.MenuItem
Expand Down Expand Up @@ -147,7 +146,7 @@ class MainActivity : AppCompatActivity() {
colors.clear()
for (i in 0..(random.nextInt(8) +2)) { // Min 2, max 10 colors
val randomColor = getRandomColor()
val name = "%06X".format(0xFFFFFF and randomColor).toUpperCase(Locale.getDefault())
val name = "%06X".format(0xFFFFFF and randomColor).uppercase()
colors.add(AdobeColor(randomColor, name))
}
colorAdapter.updateData(colors)
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ buildscript {
ext {
libraryVersion = "$VERSION"
libraryVersionCode = Integer.parseInt(rootProject.properties["VERSION_CODE"])
kotlinVersion = '1.5.21'
kotlinVersion = '1.5.31'
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.5.0'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.5.30'
}
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright © Marc Auberer 2021. All rights reserved
# Copyright Marc Auberer 2021. All rights reserved
#

# Project-wide Gradle settings.
Expand All @@ -26,8 +26,8 @@ kotlin.code.style=official

# Custom settings
GROUP=com.chillibits
VERSION=1.0.2
VERSION_CODE=1002
VERSION=1.0.3
VERSION_CODE=1003
POM_URL=https://github.com/marcauberer/adobe-color-tool
POM_SCM_URL=https://github.com/marcauberer/adobe-color-tool
POM_SCM_CONNECTION=scm:[email protected]:marcauberer/adobe-color-tool.git
Expand Down

0 comments on commit 656a221

Please sign in to comment.