Skip to content

Commit

Permalink
Merge pull request #59 from infinum/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
bojankoma authored Aug 5, 2022
2 parents a54caed + a93c7f4 commit e56420b
Show file tree
Hide file tree
Showing 19 changed files with 89 additions and 48 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
==========

## Version 1.3.5

_2022-08-05_

* Update dependencies.
* Add Kotlin default parameter option for compiler backend.

## Version 1.3.4

_2022-05-10_
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.infinum.collar:collar-plugin:1.3.4"
classpath "com.infinum.collar:collar-plugin:1.3.5"
}
}
```
Expand All @@ -42,7 +42,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.infinum.collar:collar-plugin:1.3.4")
classpath("com.infinum.collar:collar-plugin:1.3.5")
}
}
```
Expand Down Expand Up @@ -261,13 +261,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.3.4"
releaseImplementation "com.infinum.collar:collar-ui-no-op:1.3.4"
debugImplementation "com.infinum.collar:collar-ui:1.3.5"
releaseImplementation "com.infinum.collar:collar-ui-no-op:1.3.5"
```
**KotlinDSL**
```kotlin
debugImplementation("com.infinum.collar:collar-ui:1.3.4")
releaseImplementation("com.infinum.collar:collar-ui-no-op:1.3.4")
debugImplementation("com.infinum.collar:collar-ui:1.3.5")
releaseImplementation("com.infinum.collar:collar-ui-no-op:1.3.5")
```

In order to start tracking with UI you must use _LiveCollector_ as in this example:
Expand Down
3 changes: 3 additions & 0 deletions annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
'-Xjvm-default=all'
]
}
}
compileTestKotlin {
Expand Down
14 changes: 9 additions & 5 deletions config.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
ext {
def major = 1
def minor = 3
def patch = 5

buildConfig = [
"minSdk" : 19,
"compileSdk": 31,
"targetSdk" : 31,
"buildTools": "31.0.0"
"compileSdk": 32,
"targetSdk" : 32,
"buildTools": "32.0.0"
]
releaseConfig = [
"group" : "com.infinum.collar",
"version" : "1.3.4",
"versionCode": 1 * 100 * 100 + 3 * 100 + 4
"version" : "$major.$minor.$patch",
"versionCode": major * 100 * 100 + minor * 100 + patch
]
}
8 changes: 8 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += [
'-Xjvm-default=all',
'-Xexplicit-api=strict'
]
}
Expand All @@ -55,6 +56,13 @@ android {
sourceSets.each {
it.java.srcDirs += "src/$it.name/kotlin"
}

publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
Expand Down
4 changes: 0 additions & 4 deletions detekt.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ apply plugin: "io.gitlab.arturbosch.detekt"
detekt {
toolVersion = libs.versions.detekt.get()
}

dependencies {
detektPlugins libs.detekt.formatting
}
3 changes: 2 additions & 1 deletion generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
'-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi'
'-Xjvm-default=all',
'-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi'
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android.enableJetifier=false

kotlin.code.style=official
# Revert back to true after Kotlin 1.5.20 bugfix but it still doesn't work in 1.5.21
kapt.use.worker.api=false
#kapt.use.worker.api=false

# org.gradle.daemon=false
# org.gradle.debug=true
40 changes: 20 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
[versions]
collar = "1.3.4"
gradle = "7.0.4"
lint = "30.0.4"
kotlin = "1.6.10"
coroutines = "1.6.0"
serialization = "1.3.1"
poet = "1.10.2"
collar = "1.3.5"
gradle = "7.2.2"
lint = "30.2.1"
kotlin = "1.7.10"
coroutines = "1.6.4"
serialization = "1.3.3"
poet = "1.12.0"
annotations = "23.0.0"
core = "1.7.0"
appcompat = "1.4.0"
activity = "1.4.0"
fragment = "1.4.0"
lifecycle = "2.4.0"
core = "1.8.0"
appcompat = "1.4.2"
activity = "1.5.1"
fragment = "1.5.1"
lifecycle = "2.5.1"
recyclerview = "1.2.1"
room = "2.4.0"
startup = "1.1.0"
room = "2.4.3"
startup = "1.1.1"
dynamicanimation = "1.0.0"
design = "1.4.0"
koin = "3.1.4"
design = "1.6.1"
koin = "3.2.0"
timber = "5.0.1"
detekt = "1.18.0"
ktlintplugin = "10.2.0"
ktlint = "0.43.1"
detekt = "1.21.0"
ktlintplugin = "10.3.0"
ktlint = "0.45.2"
cpd = "3.2"
dokka = "1.6.0"
dokka = "1.7.10"

[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.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 3 additions & 0 deletions lint/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ java {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
'-Xjvm-default=all'
]
}
}
compileTestKotlin {
Expand Down
4 changes: 3 additions & 1 deletion plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ java {

compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
'-Xjvm-default=all'
]
}
}
compileTestKotlin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.infinum.collar.plugin.tasks

import com.android.builder.model.AndroidProject.FD_GENERATED
import com.infinum.collar.generator.CollarGenerator
import com.infinum.collar.plugin.CollarExtension
import com.infinum.collar.plugin.collarVersion
Expand All @@ -24,6 +23,7 @@ internal open class GenerateTask : BaseSourceTask() {
const val GROUP = "collar"
const val NAME = "generate"
const val DESCRIPTION = "Generates Kotlin files for screen names, events and user properties."
const val FD_GENERATED = "generated"
}

private val collarGenerator = CollarGenerator()
Expand Down
3 changes: 2 additions & 1 deletion processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += [
'-Xopt-in=com.squareup.kotlinpoet.metadata.KotlinPoetMetadataPreview'
'-Xjvm-default=all',
'-Xopt-in=com.squareup.kotlinpoet.metadata.KotlinPoetMetadataPreview'
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal abstract class CommonSpec(
override fun file(): FileSpec =
FileSpec.builder(packageName, simpleName)
.addAnnotation(jvmName())
.addComment(comment().toString())
.addFileComment(comment().toString())
.apply { extensions().map { addFunction(it) } }
.build()

Expand Down
8 changes: 8 additions & 0 deletions ui-no-op/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += [
'-Xjvm-default=all',
'-Xexplicit-api=strict'
]
}
Expand All @@ -58,6 +59,13 @@ android {
sourceSets.each {
it.java.srcDirs += "src/$it.name/kotlin"
}

publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
Expand Down
16 changes: 12 additions & 4 deletions ui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "com.android.library"
id "kotlin-android"
id "com.google.devtools.ksp" version "1.6.10-1.0.2"
id "com.google.devtools.ksp" version "1.7.10-1.0.6"
}

android {
Expand All @@ -24,7 +24,7 @@ android {
javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.incremental": "true",
"room.incremental": "true",
]
}
}
Expand Down Expand Up @@ -55,8 +55,9 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += [
'-Xexplicit-api=strict',
'-Xopt-in=kotlinx.coroutines.DelicateCoroutinesApi'
'-Xjvm-default=all',
'-Xexplicit-api=strict',
'-Xopt-in=kotlinx.coroutines.DelicateCoroutinesApi'
]
}
packagingOptions {
Expand All @@ -77,6 +78,13 @@ android {
sourceSets.each {
it.java.srcDirs += "src/$it.name/kotlin"
}

publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal class EntityRepository(

override suspend fun save(input: EntityParameters) =
input.entity?.let { dao.save(it) }
?: throw IllegalStateException("Cannot save null entity")
?: error("Cannot save null entity")

override suspend fun load(input: EntityParameters): Flow<List<CollarEntity>> =
with(input) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ internal class ViewBindingDelegate<T : ViewBinding>(
.currentState
.isAtLeast(Lifecycle.State.INITIALIZED).not()
) {
throw IllegalStateException("Fragment views are not created yet.")
error("Fragment views are not created yet.")
}

viewBindingFactory(thisRef.requireView()).also { this.binding = it }
Expand Down

0 comments on commit e56420b

Please sign in to comment.