Skip to content

Commit

Permalink
Release 1.2.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bojan committed Jul 9, 2021
1 parent c94c3fd commit fbd1ff7
Show file tree
Hide file tree
Showing 24 changed files with 67 additions and 59 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change Log
==========

## Version 1.2.7

_2021-07-09_

* Update dependencies.

## Version 1.2.6

_2021-05-21_
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.infinum.collar:collar-plugin:1.2.6"
classpath "com.infinum.collar:collar-plugin:1.2.7"
}
}
```
Expand All @@ -41,7 +41,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.infinum.collar:collar-plugin:1.2.6")
classpath("com.infinum.collar:collar-plugin:1.2.7")
}
}
```
Expand Down Expand Up @@ -253,13 +253,13 @@ You can search, filter and clear all sent analytics.
In your app `build.gradle` or `build.gradle.kts` add:
**Groovy**
```gradle
debugImplementation "com.infinum.collar:collar-ui:1.2.6"
releaseImplementation "com.infinum.collar:collar-ui-no-op:1.2.6"
debugImplementation "com.infinum.collar:collar-ui:1.2.7"
releaseImplementation "com.infinum.collar:collar-ui-no-op:1.2.7"
```
**KotlinDSL**
```kotlin
debugImplementation("com.infinum.collar:collar-ui:1.2.6")
releaseImplementation("com.infinum.collar:collar-ui-no-op:1.2.6")
debugImplementation("com.infinum.collar:collar-ui:1.2.7")
releaseImplementation("com.infinum.collar:collar-ui-no-op:1.2.7")
```

In order to start tracking with UI you must use _LiveCollector_ as in this example:
Expand Down
2 changes: 0 additions & 2 deletions annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}

Expand Down
4 changes: 2 additions & 2 deletions config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
]
releaseConfig = [
"group" : "com.infinum.collar",
"version" : "1.2.6",
"versionCode": 1 * 100 * 100 + 2 * 100 + 6
"version" : "1.2.7",
"versionCode": 1 * 100 * 100 + 2 * 100 + 7
]
}
5 changes: 2 additions & 3 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ android {
freeCompilerArgs += [
'-Xexplicit-api=strict'
]
useIR = true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
Expand All @@ -64,8 +63,8 @@ dependencies {
compileOnly libs.annotations
implementation libs.androidx.core

testImplementation "junit:junit:4.13"
testImplementation 'org.mockito:mockito-core:3.3.3'
testImplementation "junit:junit:4.13.2"
testImplementation 'org.mockito:mockito-core:3.11.2'
}

apply from: "publish.gradle"
2 changes: 0 additions & 2 deletions generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ package com.infinum.collar.generator.extensions
import com.infinum.collar.generator.models.DataType
import java.util.Locale

internal fun String.toCamelCase(): String = split(" ", "_").joinToString("") { it.capitalize(Locale.getDefault()) }
internal fun String.toCamelCase(): String = split(" ", "_").joinToString("") { it.replaceFirstChar { value ->
if (value.isLowerCase()) value.titlecase(
Locale.getDefault()
) else value.toString()
} }

internal fun String.isFirstCharDigit(): Boolean = this.firstOrNull()?.isDigit() ?: false

internal fun String.toEnumValue(): String {
var parameterValueEnumName = this.toUpperCase(Locale.ENGLISH).replace(" ", "_").replace(".", "_")
var parameterValueEnumName = this.uppercase(Locale.ENGLISH).replace(" ", "_").replace(".", "_")
if (this.isFirstCharDigit()) {
parameterValueEnumName = "${DataType.NUMBER.name.toUpperCase(Locale.ENGLISH)}_$parameterValueEnumName"
parameterValueEnumName = "${DataType.NUMBER.name.uppercase(Locale.ENGLISH)}_$parameterValueEnumName"
}
return parameterValueEnumName
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ internal class EventsGenerator(
}

val constructorParamBuilder = ParameterSpec.builder(
parameter.name.toCamelCase().decapitalize(Locale.ENGLISH),
parameter.name.toCamelCase().replaceFirstChar { it.lowercase(Locale.ENGLISH) },
type
).apply {
parameter.description
Expand Down Expand Up @@ -85,10 +85,10 @@ internal class EventsGenerator(

eventClass.addProperty(
PropertySpec.builder(
parameter.name.toCamelCase().decapitalize(Locale.ENGLISH),
parameter.name.toCamelCase().replaceFirstChar { it.lowercase(Locale.ENGLISH) },
type
)
.initializer(parameter.name.toCamelCase().decapitalize(Locale.ENGLISH))
.initializer(parameter.name.toCamelCase().replaceFirstChar { it.lowercase(Locale.ENGLISH) })
.build()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal class ScreensGenerator(
it.forEach { screen ->
addProperty(
PropertySpec.builder(
screen.name.toUpperCase(Locale.ENGLISH).replace(" ", "_"),
screen.name.uppercase(Locale.ENGLISH).replace(" ", "_"),
String::class,
KModifier.CONST
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ internal enum class DataType(val className: ClassName) {

companion object {

operator fun invoke(name: String) = values().firstOrNull { it.toString().toLowerCase(Locale.ENGLISH) == name }
operator fun invoke(name: String) = values().firstOrNull { it.toString().lowercase(Locale.ENGLISH) == name }
}
}
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ android.useAndroidX=true
android.enableJetifier=false

kotlin.code.style=official
kapt.use.worker.api=true
# Revert back to true after Kotlin 1.5.20 bugfix
kapt.use.worker.api=false

# org.gradle.daemon=false
# org.gradle.debug=true
26 changes: 13 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[versions]
collar = "1.2.6"
gradle = "4.2.1"
kotlin = "1.5.0"
collar = "1.2.7"
gradle = "4.2.2"
kotlin = "1.5.20"
coroutines = "1.5.0"
serialization = "1.2.1"
poet = "1.8.0"
annotations = "20.1.0"
core = "1.5.0"
poet = "1.9.0"
annotations = "21.0.1"
core = "1.6.0"
appcompat = "1.3.0"
activity = "1.2.3"
fragment = "1.3.4"
fragment = "1.3.5"
lifecycle = "2.3.1"
recyclerview = "1.2.0"
recyclerview = "1.2.1"
room = "2.3.0"
startup = "1.0.0"
dynamicanimation = "1.0.0"
design = "1.3.0"
koin = "3.0.2"
design = "1.4.0"
koin = "3.1.2"
timber = "4.7.1"
detekt = "1.17.0"
ktlint = "10.0.0"
detekt = "1.17.1"
ktlint = "10.1.0"
cpd = "3.1"
dokka = "1.4.32"
dokka = "1.5.0"

[libraries]
libraryannotations = { module = "com.infinum.collar:collar-annotations", version.ref = "collar" }
Expand Down
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.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 0 additions & 2 deletions lint/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}

Expand Down
2 changes: 0 additions & 2 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}

Expand Down
2 changes: 0 additions & 2 deletions processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal abstract class CommonSpec(
.build()

override fun jvmName(): AnnotationSpec =
AnnotationSpec.builder(JvmName::class.java)
AnnotationSpec.builder(JvmName::class)
.addMember(CodeBlock.of("%S", "${CLASS_COLLAR.simpleName}$simpleName"))
.build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal class ScreenNameSpec(
.any { it == CLASS_SUPPORT_FRAGMENT || it == CLASS_FRAGMENT }

private fun suppressDeprecation(): AnnotationSpec =
AnnotationSpec.builder(Suppress::class.java)
AnnotationSpec.builder(Suppress::class)
.addMember(CodeBlock.of("%S", "DEPRECATION"))
.build()

Expand Down
12 changes: 6 additions & 6 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}
dependencies {
classpath libs.gradle
classpath libs.libraryplugin
// classpath libs.libraryplugin
}
}

Expand All @@ -15,7 +15,7 @@ plugins {
id "kotlin-kapt"
}

apply plugin: "com.infinum.collar.plugin"
//apply plugin: "com.infinum.collar.plugin"

android {
compileSdkVersion buildConfig.compileSdk
Expand Down Expand Up @@ -87,7 +87,7 @@ dependencies {
releaseImplementation libs.libraryuinoop
}

collar {
fileName = "example.json"
packageName = "com.infinum.collar.sample.analytics.trackingplan"
}
//collar {
// fileName = "example.json"
// packageName = "com.infinum.collar.sample.analytics.trackingplan"
//}
16 changes: 12 additions & 4 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@
android:label="Collar Sample"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.infinum.collar.sample.MainActivity">
<activity
android:name="com.infinum.collar.sample.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.infinum.collar.sample.ChildActivity" />
<activity android:name="com.infinum.collar.sample.KotlinMainActivity" />
<activity android:name="com.infinum.collar.sample.KotlinChildActivity" />
<activity
android:name="com.infinum.collar.sample.ChildActivity"
android:exported="false" />
<activity
android:name="com.infinum.collar.sample.KotlinMainActivity"
android:exported="false" />
<activity
android:name="com.infinum.collar.sample.KotlinChildActivity"
android:exported="false" />
</application>

</manifest>
1 change: 0 additions & 1 deletion ui-no-op/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ android {
freeCompilerArgs += [
'-Xexplicit-api=strict'
]
useIR = true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
Expand Down
1 change: 0 additions & 1 deletion ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ android {
'-Xexplicit-api=strict',
'-Xopt-in=kotlinx.coroutines.DelicateCoroutinesApi'
]
useIR = true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
Expand Down
1 change: 1 addition & 0 deletions ui/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
android:label="@string/collar_name">
<activity
android:name=".ui.presentation.CollarActivity"
android:exported="true"
android:label="@string/collar_name"
android:theme="@style/Collar.Theme" />
</application>
Expand Down
3 changes: 2 additions & 1 deletion ui/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<application>
<activity
android:name="com.infinum.collar.ui.presentation.CollarActivity"
android:exported="true"
android:label="@string/collar_name"
android:taskAffinity="com.infinum.collar"
android:theme="@style/Collar.Theme">
Expand All @@ -24,7 +25,7 @@
tools:node="merge">
<meta-data
android:name="com.infinum.collar.ui.CollarInitializer"
android:value="androidx.startup"/>
android:value="androidx.startup" />
</provider>
</application>

Expand Down

0 comments on commit fbd1ff7

Please sign in to comment.