Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

KotlinX coroutines #1053

Merged
merged 5 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions Android/Kotlin/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"Registrations": [
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "kotlin-stdlib",
"GroupId": "org.jetbrains.kotlin",
"Version": "1.4.20"
}
}
},
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "kotlin-stdlib-common",
"GroupId": "org.jetbrains.kotlin",
"Version": "1.4.20"
}
}
},
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "kotlin-reflect",
"GroupId": "org.jetbrains.kotlin",
"Version": "1.4.20"
}
}
},
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "kotlin-stdlib-jdk7",
"GroupId": "org.jetbrains.kotlin",
"Version": "1.4.20"
}
}
},
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "kotlin-stdlib-jdk8",
"GroupId": "org.jetbrains.kotlin",
"Version": "1.4.20"
}
}
},
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "annotations",
"GroupId": "org.jetbrains.kotlin",
"Version": "13.0.0.3"
}
}
},
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "kotlinx-coroutines-android",
"GroupId": "org.jetbrains.kotlinx",
"Version": "1.3.4"
}
}
},
{
"Component": {
"Type": "Maven",
"Maven": {
"ArtifactId": "kotlinx-coroutines-core",
"GroupId": "org.jetbrains.kotlinx",
"Version": "1.3.4"
}
}
}
],
"Version": 1
}
14 changes: 14 additions & 0 deletions Android/Kotlin/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@
"version" : "13.0",
"nugetId" : "Xamarin.Jetbrains.Annotations",
"nugetVersion" : "13.0.0.3"
},
{
"groupId" : "org.jetbrains.kotlinx",
"artifactId" : "kotlinx-coroutines-android",
"version" : "1.3.4",
"nugetId" : "Xamarin.KotlinX.Coroutines.CoroutinesAndroid",
"nugetVersion" : "1.3.4"
},
{
"groupId" : "org.jetbrains.kotlinx",
"artifactId" : "kotlinx-coroutines-core",
"version" : "1.3.4",
"nugetId" : "Xamarin.KotlinX.Coroutines.Core",
"nugetVersion" : "1.3.4"
}
]
}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<enum-field-mappings>
<!--
This example converts the constants Fragment_id, Fragment_name,
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag
to an enum called Android.Support.V4.App.FragmentTagType with values
Id, Name, and Tag.

<mapping clr-enum-type="Android.Support.V4.App.FragmentTagType" jni-class="android/support/v4/app/FragmentActivity$FragmentTag">
<field clr-name="Id" jni-name="Fragment_id" value="1" />
<field clr-name="Name" jni-name="Fragment_name" value="0" />
<field clr-name="Tag" jni-name="Fragment_tag" value="2" />
</type>

Notes:
- An optional "bitfield" attribute marks the enum type with [Flags].
- For Java interfaces, use "jni-interface" attribute instead of "jni-class" attribute.
-->
</enum-field-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<enum-method-mappings>
<!--
This example changes the Java method:
android.support.v4.app.Fragment.SavedState.writeToParcel (int flags)
to be:
android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags)
when bound in C#.

<mapping jni-class="android/support/v4/app/Fragment.SavedState">
<method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" />
</mapping>

Notes:
- For Java interfaces, use "jni-interface" attribute instead of "jni-class" attribute.
- To change the type of the return value, use "return" as the parameter name.
- The parameter names will be p0, p1, ... unless you provide JavaDoc file in the project.
-->
</enum-method-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<attr
path="/api/package[@name='kotlinx.coroutines']"
name="managedName"
>
Xamarin.KotlinX.Coroutines
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.channels']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Channels
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.flow']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Flow
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.flow.internal']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Flow.Internal
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.internal']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Internal
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.intrinsics']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Intrinsics
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.scheduling']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Scheduling
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.selects']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Selects
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.sync']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Sync
</attr>
<attr
path="/api/package[@name='kotlinx.coroutines.test']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.Test
</attr>

</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<!--
duplicate

removed:
obsolete
-->
<remove-node
path="/api/package[@name='kotlinx.coroutines.channels']/class[@name='ChannelsKt']/method[@name='filterIndexedTo' and count(parameter)=4 and parameter[1][@type='kotlinx.coroutines.channels.ReceiveChannel&lt;? extends E&gt;'] and parameter[2][@type='C'] and parameter[3][@type='kotlin.jvm.functions.Function2&lt;? super java.lang.Integer, ? super E, java.lang.Boolean&gt;'] and parameter[4][@type='kotlin.coroutines.Continuation&lt;? super C&gt;']]"
/>
<remove-node
path="/api/package[@name='kotlinx.coroutines.channels']/class[@name='ChannelsKt']/method[@name='filterIndexedTo' and count(parameter)=4 and parameter[1][@type='kotlinx.coroutines.channels.ReceiveChannel&lt;? extends E&gt;'] and parameter[2][@type='C'] and parameter[3][@type='kotlin.jvm.functions.Function2&lt;? super java.lang.Integer, ? super E, java.lang.Boolean&gt;'] and parameter[4][@type='kotlin.coroutines.Continuation&lt;? super C&gt;']]"
/>
<remove-node
path="/api/package[@name='kotlinx.coroutines.channels']/class[@name='ChannelsKt']/method[@name='filterNotTo' and count(parameter)=4 and parameter[1][@type='kotlinx.coroutines.channels.ReceiveChannel&lt;? extends E&gt;'] and parameter[2][@type='C'] and parameter[3][@type='kotlin.jvm.functions.Function1&lt;? super E, java.lang.Boolean&gt;'] and parameter[4][@type='kotlin.coroutines.Continuation&lt;? super C&gt;']]"
/>
<remove-node
path="/api/package[@name='kotlinx.coroutines.channels']/class[@name='ChannelsKt']/method[@name='filterNotTo' and count(parameter)=4 and parameter[1][@type='kotlinx.coroutines.channels.ReceiveChannel&lt;? extends E&gt;'] and parameter[2][@type='C'] and parameter[3][@type='kotlin.jvm.functions.Function1&lt;? super E, java.lang.Boolean&gt;'] and parameter[4][@type='kotlin.coroutines.Continuation&lt;? super C&gt;']]"
/>
<remove-node
path="/api/package[@name='kotlinx.coroutines.channels']/class[@name='ChannelsKt']/method[@name='filterNotNullTo' and count(parameter)=3 and parameter[1][@type='kotlinx.coroutines.channels.ReceiveChannel&lt;? extends E&gt;'] and parameter[2][@type='C'] and parameter[3][@type='kotlin.coroutines.Continuation&lt;? super C&gt;']]"
/>
<remove-node
path="/api/package[@name='kotlinx.coroutines.channels']/class[@name='ChannelsKt']/method[@name='filterNotNullTo' and count(parameter)=3 and parameter[1][@type='kotlinx.coroutines.channels.ReceiveChannel&lt;? extends E&gt;'] and parameter[2][@type='C'] and parameter[3][@type='kotlin.coroutines.Continuation&lt;? super C&gt;']]"
/>

<remove-node
path="/api/package[@name='kotlinx.coroutines.internal']"
/>

</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<enum-field-mappings>
<!--
This example converts the constants Fragment_id, Fragment_name,
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag
to an enum called Android.Support.V4.App.FragmentTagType with values
Id, Name, and Tag.

<mapping clr-enum-type="Android.Support.V4.App.FragmentTagType" jni-class="android/support/v4/app/FragmentActivity$FragmentTag">
<field clr-name="Id" jni-name="Fragment_id" value="1" />
<field clr-name="Name" jni-name="Fragment_name" value="0" />
<field clr-name="Tag" jni-name="Fragment_tag" value="2" />
</type>

Notes:
- An optional "bitfield" attribute marks the enum type with [Flags].
- For Java interfaces, use "jni-interface" attribute instead of "jni-class" attribute.
-->
</enum-field-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<enum-method-mappings>
<!--
This example changes the Java method:
android.support.v4.app.Fragment.SavedState.writeToParcel (int flags)
to be:
android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags)
when bound in C#.

<mapping jni-class="android/support/v4/app/Fragment.SavedState">
<method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" />
</mapping>

Notes:
- For Java interfaces, use "jni-interface" attribute instead of "jni-class" attribute.
- To change the type of the return value, use "return" as the parameter name.
- The parameter names will be p0, p1, ... unless you provide JavaDoc file in the project.
-->
</enum-method-mappings>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>

<attr
path="/api/package[@name='kotlinx.coroutines.android']"
name="managedName"
>
Xamarin.KotlinX.Coroutines.CoroutinesAndroid
</attr>

</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>

<attr
path="/api/package[@name='kotlinx.coroutines.android']/class[@name='HandlerDispatcher']/method[@name='getImmediate' and count(parameter)=0]" name="managedReturn"
>
Xamarin.KotlinX.Coroutines.MainCoroutineDispatcher
</attr>

</metadata>