Skip to content

Commit a2b5235

Browse files
author
Patrick Jackson
committed
update redux-kotlin-thunk to kts build file. add platforms
1 parent f77052b commit a2b5235

File tree

6 files changed

+120
-138
lines changed

6 files changed

+120
-138
lines changed

build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ allprojects {
3333
}
3434
}
3535

36-
task clean(type: Delete) {
37-
delete rootProject.buildDir
38-
}
39-
4036
def addDependency(Upload task, String groupId, String artifactId, String version, String type) {
4137
task.repositories.withType(org.gradle.api.artifacts.maven.MavenDeployer) { mavenDeployer ->
4238
task.doFirst {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ kotlin.code.style=official
2222
org.gradle.internal.publish.checksums.insecure=true
2323

2424
GROUP=org.reduxkotlin
25-
VERSION_NAME=0.5.4
25+
VERSION_NAME=0.5.5
2626

2727
POM_ARTIFACT_ID=reduxkotlin-thunk
2828
POM_DESCRIPTION=Redux thunmk implementation for Redux-Kotlin. Mulitiplatform supported.

redux-kotlin-thunk/build.gradle

Lines changed: 0 additions & 130 deletions
This file was deleted.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
plugins {
2+
java
3+
kotlin("multiplatform")
4+
}
5+
6+
kotlin {
7+
androidNativeArm32()
8+
androidNativeArm64()
9+
iosArm32()
10+
iosArm64()
11+
iosX64()
12+
js(BOTH) {
13+
browser()
14+
nodejs()
15+
16+
listOf(compilations["main"], compilations["test"]).forEach {
17+
with(it.kotlinOptions) {
18+
moduleKind = "umd"
19+
sourceMap = true
20+
sourceMapEmbedSources = "always"
21+
metaInfo = true
22+
}
23+
}
24+
}
25+
jvm()
26+
linuxArm32Hfp()
27+
linuxArm64()
28+
linuxMips32()
29+
linuxMipsel32()
30+
linuxX64()
31+
macosX64()
32+
mingwX64()
33+
mingwX86()
34+
tvosArm64()
35+
tvosX64()
36+
wasm32()
37+
watchosArm32()
38+
watchosArm64()
39+
watchosX86()
40+
41+
sourceSets {
42+
commonMain {
43+
dependencies {
44+
implementation("org.reduxkotlin:redux-kotlin:0.5.5")
45+
}
46+
}
47+
commonTest {
48+
dependencies {
49+
implementation(kotlin("test-common"))
50+
implementation(kotlin("test-annotations-common"))
51+
}
52+
}
53+
54+
val fallback: (org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet.() -> Unit) = {
55+
kotlin.srcDir("src/fallbackMain")
56+
}
57+
val ios: (org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet.() -> Unit) = {
58+
kotlin.srcDir("src/iosMain/kotlin")
59+
}
60+
61+
val androidNativeArm32Main by getting(fallback)
62+
val androidNativeArm64Main by getting(fallback)
63+
val iosArm32Main by getting(ios)
64+
val iosArm32Test by getting(ios)
65+
val iosArm64Main by getting(ios)
66+
val iosArm64Test by getting(ios)
67+
val iosX64Main by getting(ios)
68+
val linuxArm32HfpMain by getting(fallback)
69+
val linuxArm64Main by getting(fallback)
70+
val linuxMips32Main by getting(fallback)
71+
val linuxMipsel32Main by getting(fallback)
72+
val linuxX64Main by getting(fallback)
73+
val jsTest by getting {
74+
dependencies {
75+
implementation(kotlin("test-js"))
76+
}
77+
}
78+
val jvmTest by getting {
79+
dependencies {
80+
implementation(kotlin("test"))
81+
implementation(kotlin("test-junit"))
82+
}
83+
}
84+
85+
val mingwX64Main by getting(fallback)
86+
val mingwX86Main by getting(fallback)
87+
val tvosArm64Main by getting(ios)
88+
val tvosX64Main by getting(ios)
89+
val wasm32Main by getting(fallback)
90+
val watchosArm32Main by getting(ios)
91+
val watchosArm64Main by getting(ios)
92+
val watchosX86Main by getting(ios)
93+
}
94+
}
95+
96+
afterEvaluate {
97+
tasks {
98+
// Alias the task names we use elsewhere to the new task names.
99+
create("installMP").dependsOn("publishKotlinMultiplatformPublicationToMavenLocal")
100+
create("installLocally") {
101+
dependsOn("publishKotlinMultiplatformPublicationToTestRepository")
102+
dependsOn("publishJvmPublicationToTestRepository")
103+
dependsOn("publishJsPublicationToTestRepository")
104+
dependsOn("publishMetadataPublicationToTestRepository")
105+
}
106+
create("installIosLocally") {
107+
dependsOn("publishKotlinMultiplatformPublicationToTestRepository")
108+
dependsOn("publishIosArm32PublicationToTestRepository")
109+
dependsOn("publishIosArm64PublicationToTestRepository")
110+
dependsOn("publishIosX64PublicationToTestRepository")
111+
dependsOn("publishMetadataPublicationToTestRepository")
112+
}
113+
// NOTE: We do not alias uploadArchives because CI runs it on Linux and we only want to run it on Mac OS.
114+
// tasks.create("uploadArchives").dependsOn("publishKotlinMultiplatformPublicationToMavenRepository")
115+
}
116+
}
117+
118+
apply(from = rootProject.file("gradle/publish.gradle"))

redux-kotlin-thunk/proguard-rules.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add project specific ProGuard rules here.
22
# You can control the set of applied configuration files using the
3-
# proguardFiles setting in build.gradle.
3+
# proguardFiles setting in build.gradle.kts.
44
#
55
# For more details, see
66
# http://developer.android.com/guide/developing/tools/proguard.html

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ pluginManagement {
1010

1111
include ':redux-kotlin-thunk'
1212
rootProject.name='Redux-Kotlin-thunk'
13-
14-
enableFeaturePreview('GRADLE_METADATA')

0 commit comments

Comments
 (0)