-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
306c268
commit 5a8c259
Showing
71 changed files
with
1,559 additions
and
1,720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
plugins { | ||
`javiersc-versioning` | ||
`javiersc-all-projects` | ||
`javiersc-changelog` | ||
`javiersc-code-analysis` | ||
`javiersc-code-coverage` | ||
`javiersc-code-formatter` | ||
`javiersc-docs` | ||
`kotlinx-binary-compatibility-validator` | ||
`javiersc-nexus` | ||
`javiersc-readme-badges-generator` | ||
buildscript { | ||
dependencies { | ||
classpath(libs.android.toolsBuild.gradle) | ||
classpath(libs.jetbrains.kotlin.kotlinGradlePlugin) | ||
} | ||
} | ||
|
||
removeProjectFromDoc( | ||
":samples:android:android-core", | ||
":samples:jvm:jvm-core", | ||
":samples:jvm:jvm-serialization", | ||
) | ||
|
||
fun removeProjectFromDoc(vararg paths: String) { | ||
val projects = mutableListOf<Project>() | ||
plugins { | ||
alias(libs.plugins.javiersc.hubdle) | ||
} | ||
|
||
for (path in paths) { | ||
if (findProject(path) != null) projects.add(project(path)) | ||
hubdle { | ||
config { | ||
analysis() | ||
binaryCompatibilityValidator() | ||
// coverage() | ||
documentation { | ||
changelog() | ||
readme { | ||
badges() | ||
} | ||
site { | ||
excludes( | ||
projects.mokokiTest, | ||
projects.samples.android.androidCore, | ||
projects.samples.jvm.jvmCore, | ||
projects.samples.jvm.jvmSerialization, | ||
) | ||
} | ||
} | ||
nexus() | ||
} | ||
|
||
tasks { dokkaHtmlMultiModule { removeChildTasks(projects) } } | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#################################################################################################### | ||
### CONFIGURATION ### | ||
### CONFIGURATION ### | ||
#################################################################################################### | ||
project.name=mokoki | ||
allProjects.group=com.javiersc | ||
allProjects.name=mokoki | ||
readmeBadges.mainProject=mokoki-core | ||
root.project.name=mokoki | ||
main.project.name=mokoki-core | ||
project.group=com.javiersc.mokoki | ||
#################################################################################################### | ||
### CODE ANALYSIS ### | ||
#################################################################################################### | ||
codeAnalysis.sonar.organization=javiersc | ||
analysis.sonar.organization=javiersc | ||
analysis.sonar.projectKey=com.javiersc.mokoki:mokoki | ||
analysis.sonar.projectName=mokoki | ||
#################################################################################################### | ||
### POM ### | ||
#################################################################################################### | ||
|
@@ -20,9 +21,9 @@ pom.license.url=https://www.apache.org/licenses/LICENSE-2.0.txt | |
pom.developer.id=JavierSegoviaCordoba | ||
pom.developer.name=Javier Segovia Cordoba | ||
pom.developer.email=[email protected] | ||
pom.smc.url=https://github.com/JavierSegoviaCordoba/mokoki | ||
pom.smc.connection=scm:git:[email protected]:JavierSegoviaCordoba/mokoki.git | ||
pom.smc.developerConnection=scm:git:[email protected]:JavierSegoviaCordoba/mokoki.git | ||
pom.scm.url=https://github.com/JavierSegoviaCordoba/mokoki | ||
pom.scm.connection=scm:git:[email protected]:JavierSegoviaCordoba/mokoki.git | ||
pom.scm.developerConnection=scm:git:[email protected]:JavierSegoviaCordoba/mokoki.git | ||
#################################################################################################### | ||
### Gradle ### | ||
#################################################################################################### | ||
|
@@ -40,3 +41,4 @@ org.gradle.vfs.watch=true | |
#org.gradle.unsafe.configuration-cache-problems=warn | ||
#org.gradle.unsafe.configuration-cache.max-problems=100 | ||
signing.gnupg.executable=gpg | ||
android.disableAutomaticComponentCreation=true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[versions] | ||
android = "7.2.0" | ||
hubdle = "0.2.0-alpha.21" | ||
kotlin = "1.6.10" | ||
|
||
[libraries] | ||
android-toolsBuild-gradle = { module = "com.android.tools.build:gradle", version.ref = "android" } | ||
jetbrains-kotlin-kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } | ||
|
||
[plugins] | ||
javiersc-hubdle = { id = "com.javiersc.hubdle", version.ref = "hubdle" } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.4.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
40 changes: 40 additions & 0 deletions
40
mokoki-core/androidMain/kotlin/com/javiersc/mokoki/AndroidMokokiLogger.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.javiersc.mokoki | ||
|
||
import android.util.Log | ||
import com.javiersc.mokoki.internal.buildMokokiMessage | ||
import kotlin.reflect.KClass | ||
import kotlin.reflect.KType | ||
|
||
public open class AndroidMokokiLogger( | ||
private val minPriority: Priority = Priority.DEBUG, | ||
) : MokokiLogger { | ||
|
||
override var useCompatibleMode: Boolean = false | ||
|
||
public var defaultTag: String = "" | ||
|
||
override fun isLoggable(priority: Priority): Boolean = priority.isLoggable(minPriority) | ||
|
||
override fun <T : Any> log( | ||
priority: Priority, | ||
tag: String?, | ||
kClass: KClass<T>, | ||
kType: KType, | ||
message: T, | ||
) { | ||
val lines: List<String> = buildMokokiMessage(priority, tag, message) | ||
|
||
val logTag = tag ?: defaultTag | ||
|
||
for (line in lines) { | ||
when (priority) { | ||
Priority.VERBOSE -> Log.v(logTag, line) | ||
Priority.DEBUG -> Log.d(logTag, line) | ||
Priority.INFO -> Log.i(logTag, line) | ||
Priority.WARN -> Log.w(logTag, line) | ||
Priority.ERROR -> Log.e(logTag, line) | ||
Priority.ASSERT -> Log.wtf(logTag, line) | ||
} | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
mokoki-core/androidMain/kotlin/com/javiersc/mokoki/DefaultMokokiLogger.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.javiersc.mokoki | ||
|
||
public actual typealias DefaultMokokiLogger = AndroidMokokiLogger |
55 changes: 0 additions & 55 deletions
55
mokoki-core/androidMain/kotlin/com/javiersc/mokoki/MokokiLogger.kt
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
mokoki-core/androidMain/kotlin/com/javiersc/mokoki/internal/AndroidLoggingHandler.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.