Compare commits

...

13 Commits

7 changed files with 106 additions and 89 deletions

View File

@@ -1,5 +1,29 @@
# Changelog # Changelog
## 3.0.0
* `Version`:
* `Kotlin`: `2.3.21` -> `2.4.10`
* `Gradle`: `9.3.0` -> `9.7.1`
* `Android Gradle Plugin`: `8.13.+` -> `9.3.2`
* `Android` (compileSdk): `36` -> `37`
* `Android Build Tools`: `36.0.0` -> `37.0.0`
* `NMCP`: `1.5.0` -> `1.6.1`
## 2.10.0
* `Version`:
* `Kotlin`: `2.3.21`
* `Coroutines`: `1.11.0`
## 2.9.0
* `Version`:
* `Kotlin`: `2.3.20`
* `Serialization`: `1.11.0`
* `Dokka`: `2.2.0`
* `AndroidXWork`: `2.11.2`
## 2.8.0 ## 2.8.0
* `Version`: * `Version`:

View File

@@ -19,6 +19,7 @@ plugins {
id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version" id "org.jetbrains.kotlin.multiplatform" version "$kotlin_version"
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version"
id "org.jetbrains.dokka" version "$dokka_version" id "org.jetbrains.dokka" version "$dokka_version"
id "com.gradleup.nmcp.aggregation" version "$nmcp_version"
} }
// temporal crutch until legacy tests will be stabled or legacy target will be removed // temporal crutch until legacy tests will be stabled or legacy target will be removed
@@ -32,7 +33,7 @@ allprojects {
} }
} }
apply plugin: "com.android.library" apply plugin: "com.android.kotlin.multiplatform.library"
project.version = "$version" project.version = "$version"
project.group = "dev.inmo" project.group = "dev.inmo"
@@ -40,6 +41,20 @@ project.group = "dev.inmo"
apply from: "publish.gradle" apply from: "publish.gradle"
apply from: "github_release.gradle" apply from: "github_release.gradle"
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
nmcpAggregation {
centralPortal {
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
validationTimeout = Duration.ofHours(4)
publishingType = System.getenv('PUBLISHING_TYPE') != "" ? System.getenv('PUBLISHING_TYPE') : "USER_MANAGED"
}
publishAllProjectsProbablyBreakingProjectIsolation()
}
}
repositories { repositories {
mavenLocal() mavenLocal()
// jcenter() // jcenter()
@@ -56,11 +71,15 @@ kotlin {
browser() browser()
nodejs() nodejs()
} }
androidTarget { android {
publishLibraryVariants( compileSdk = "$android_compileSdkVersion".toInteger()
"release", buildToolsVersion = "$android_buildToolsVersion"
"debug", minSdk = "$android_minSdkVersion".toInteger()
namespace = "${project.group}.${project.name}"
compilerOptions.jvmTarget.set(
compilerOptions.jvmTarget.get().class.fromTarget("17")
) )
withHostTest {}
} }
linuxX64() linuxX64()
mingwX64() mingwX64()
@@ -107,7 +126,7 @@ kotlin {
implementation kotlin('test-js') implementation kotlin('test-js')
} }
} }
androidUnitTest { androidHostTest {
dependencies { dependencies {
implementation kotlin('test-junit') implementation kotlin('test-junit')
} }
@@ -117,39 +136,6 @@ kotlin {
apply plugin: 'com.getkeepsafe.dexcount' apply plugin: 'com.getkeepsafe.dexcount'
android {
compileSdk "$android_compileSdkVersion".toInteger()
buildToolsVersion = "$android_buildToolsVersion"
namespace "${group}.${project.name}"
defaultConfig {
minSdkVersion "$android_minSdkVersion".toInteger()
targetSdkVersion "$android_compileSdkVersion".toInteger()
versionCode "${android_code_version}".toInteger()
versionName "$version"
}
buildTypes {
release {
minifyEnabled false
}
debug {
debuggable true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test {
java.srcDir file("src/jvmTest")
}
}
}
java { java {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17

View File

@@ -1,4 +1,4 @@
dokkaHtml { dokka {
String dokkaOutputDirectoryPath = null String dokkaOutputDirectoryPath = null
switch (true) { switch (true) {
case project.hasProperty("DOKKA_PATH"): case project.hasProperty("DOKKA_PATH"):
@@ -32,7 +32,7 @@ dokkaHtml {
sourceLink { sourceLink {
localDirectory.set(file("./")) localDirectory.set(file("./"))
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/krontab/blob/master/")) remoteUrl.set(new URI("https://github.com/InsanusMokrassar/krontab/blob/master/"))
remoteLineSuffix.set("#L") remoteLineSuffix.set("#L")
} }
} }

View File

@@ -1,11 +1,17 @@
interface InjectedExecOps {
@Inject //@javax.inject.Inject
ExecOperations getExecOps()
}
private String getCurrentVersionChangelog(String version) { private String getCurrentVersionChangelog(String version) {
OutputStream changelogDataOS = new ByteArrayOutputStream() OutputStream changelogDataOS = new ByteArrayOutputStream()
exec {
def injected = project.objects.newInstance(InjectedExecOps)
injected.execOps.exec {
commandLine 'chmod', "+x", './changelog_parser.sh' commandLine 'chmod', "+x", './changelog_parser.sh'
} }
exec { injected.execOps.exec {
standardOutput = changelogDataOS standardOutput = changelogDataOS
commandLine './changelog_parser.sh', "$version", 'CHANGELOG.md' commandLine './changelog_parser.sh', version, 'CHANGELOG.md'
} }
return changelogDataOS.toString().trim() return changelogDataOS.toString().trim()

View File

@@ -1,40 +1,41 @@
org.gradle.jvmargs=-Xmx512m org.gradle.jvmargs=-Xmx1g -Xms500m
kotlin.daemon.jvmargs=-Xmx1g -Xms500m
kotlin.code.style=official kotlin.code.style=official
org.gradle.parallel=true org.gradle.parallel=true
kotlin.js.generate.externals=true
kotlin.incremental=true kotlin.incremental=true
kotlin.incremental.js=true kotlin.incremental.js=true
kotlin.incremental.multiplatform=true kotlin.incremental.multiplatform=true
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=false
kotlin_version=2.3.10 kotlin_version=2.4.10
kotlin_coroutines_version=1.10.2 kotlin_coroutines_version=1.11.0
kotlin_serialization_version=1.10.0 kotlin_serialization_version=1.11.0
dokka_version=2.1.0 dokka_version=2.2.0
klockVersion=5.4.0 klockVersion=5.4.0
nmcp_version=1.6.1
## Github reease ## Github reease
github_release_plugin_version=2.5.2 github_release_plugin_version=2.5.2
## Android ## Android
android_gradle_version=8.12.+ android_gradle_version=9.4.0
android_minSdkVersion=21 android_minSdkVersion=21
android_compileSdkVersion=36 android_compileSdkVersion=37
android_buildToolsVersion=36.0.0 android_buildToolsVersion=37.0.0
dexcount_version=4.0.0 dexcount_version=4.0.0
junit_version=4.13.2 junit_version=4.13.2
test_ext_junit_version=1.3.0 test_ext_junit_version=1.3.0
espresso_core=3.7.0 espresso_core=3.7.0
androidx_work_version=2.11.1 androidx_work_version=2.11.2
## Common ## Common
version=2.8.0 version=3.0.0
android_code_version=49 android_code_version=52

View File

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip

View File

@@ -37,6 +37,7 @@ publishing {
} }
} }
}
repositories { repositories {
if ((project.hasProperty('GITHUBPACKAGES_USER') || System.getenv('GITHUBPACKAGES_USER') != null) && (project.hasProperty('GITHUBPACKAGES_PASSWORD') || System.getenv('GITHUBPACKAGES_PASSWORD') != null)) { if ((project.hasProperty('GITHUBPACKAGES_USER') || System.getenv('GITHUBPACKAGES_USER') != null) && (project.hasProperty('GITHUBPACKAGES_PASSWORD') || System.getenv('GITHUBPACKAGES_PASSWORD') != null)) {
maven { maven {
@@ -76,7 +77,6 @@ publishing {
} }
} }
} }
}
if (project.hasProperty("signing.gnupg.keyName")) { if (project.hasProperty("signing.gnupg.keyName")) {
apply plugin: 'signing' apply plugin: 'signing'