Skip to content

Commit

Permalink
upgrade kotlin to 1.4.32 (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
wasnot authored Feb 22, 2023
1 parent 9b43b90 commit 9851565
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ jobs:
-d build_parameters[RELEASE_BRANCH]=${CIRCLE_BRANCH} \
${UI_TEST_ENDPOINT}
generate_docs:
publish_docs:
executor:
name: build
steps:
- checkout
- setup_gradle
- run:
name: Generate docs
name: Generate and Publish docs
command: |
git config --global user.name "${GITHUB_USER_NAME}"
git config --global user.email "${GITHUB_USER_EMAIL}"
./gradlew generateDocs
./gradlew publishDocs
publish:
executor:
Expand Down Expand Up @@ -142,7 +142,7 @@ workflows:
branches:
only:
- develop
- generate_docs:
- publish_docs:
filters:
branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.4.32'
repositories {
google()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/dokka.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ task dokkaModuleMd(type: Copy, group: 'documentation') {
filteringCharset = 'UTF-8'
}

task generateDocs(type: Exec, group: 'documentation') {
task publishDocs(type: Exec, group: 'documentation') {
commandLine "ruby", "scripts/publish_docs.rb"
standardOutput = new ByteArrayOutputStream()
ext.output = {
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/projectDokka.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ afterEvaluate {
pluginsMapConfiguration.set(["org.jetbrains.dokka.base.DokkaBase": configJson])
}
dokkaHtml.dependsOn rootProject.dokkaModuleMd
rootProject.generateDocs.dependsOn dokkaHtml
rootProject.publishDocs.dependsOn dokkaHtml

dokkaHtml.doLast {
file("$buildDir/dokka/html/index.html").write(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ internal class FileAppender internal constructor(threadName: String = THREAD_NAM
val date = Clock.now()
val prefix = date.asPrefix()
return logDir?.let { dir ->
dir.files().filter { it.name.startsWith(prefix) }.maxBy { it.name }
dir.files().filter { it.name.startsWith(prefix) }.maxByOrNull { it.name }
?: File(dir, "${prefix}_${date.time}.log")
}
}
Expand All @@ -99,7 +99,7 @@ internal class FileAppender internal constructor(threadName: String = THREAD_NAM
val date = Clock.now()
val tid = Process.myTid()
handler.post {
buffer.appendln(Layout.layout(date, tid, log))
buffer.appendLine(Layout.layout(date, tid, log))
if (buffer.length > BUFFER_SIZE) write()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fun getThreadByName(threadName: String = InternalUtils.threadName): Thread? {
// NOTE: idがincrementalに振られることを信頼している
return Thread.getAllStackTraces().keys.filter {
it.name == threadName
}.maxBy { it.id }
}.maxByOrNull { it.id }
}

private fun getLooperByThreadName(threadName: String): Looper? {
Expand Down
3 changes: 1 addition & 2 deletions examples/sample_java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.3'
Expand All @@ -13,7 +13,6 @@ apply plugin: 'io.karte.android'
android {
compileSdkVersion 31


defaultConfig {
applicationId "io.karte.tracker_sample"
minSdkVersion 21
Expand Down
2 changes: 1 addition & 1 deletion examples/sample_kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ class MainActivity : AppCompatActivity() {
val user_id = edit_user_id.getText().toString()
if (user_id.length > 0) {
val values = HashMap<String, Any>()
values["user_id"] = user_id
values["is_app_user"] = true
Tracker.identify(values)
Tracker.identify(user_id, values)
} else {
Log.w(TAG, "no user_id")
}
Expand Down
3 changes: 1 addition & 2 deletions gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext.kotlin_version = '1.6.21'
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand All @@ -13,7 +13,6 @@ apply plugin: 'kotlin'

repositories {
mavenCentral()
jcenter()
google()
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/publish_docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def self.release_proc(dir)

def initialize
@parser = OptionParser.new do |opt|
opt.program_name = 'generate_docs'
opt.program_name = 'publish_docs'
opt.version = '0.0.1'
opt.banner = "Usage: #{opt.program_name} [options]"

Expand Down

0 comments on commit 9851565

Please sign in to comment.