-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from icerockdev/develop
Release 0.20.1
- Loading branch information
Showing
17 changed files
with
94 additions
and
53 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
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
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
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
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
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
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
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
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
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
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
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
42 changes: 42 additions & 0 deletions
42
resources-generator/src/main/kotlin/dev/icerock/gradle/utils/KotlinNativeLinkExt.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,42 @@ | ||
/* | ||
* Copyright 2022 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. | ||
*/ | ||
|
||
package dev.icerock.gradle.utils | ||
|
||
import org.gradle.api.file.FileCollection | ||
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompileTool | ||
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinNativeCompile | ||
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink | ||
|
||
val KotlinNativeLink.klibs: FileCollection | ||
get() { | ||
return try { | ||
val getLibraries = | ||
AbstractKotlinNativeCompile::class.java.getDeclaredMethod("getLibraries") | ||
val getIntermediateLibrary = | ||
KotlinNativeLink::class.java.getDeclaredMethod("getSource") | ||
|
||
@Suppress("UNCHECKED_CAST") | ||
val libs: FileCollection = getLibraries.invoke(this) as FileCollection | ||
val library: FileCollection = getIntermediateLibrary.invoke(this) as FileCollection | ||
|
||
libs.plus(library) | ||
} catch (exc: NoSuchMethodException) { | ||
libraries.plus(sources) | ||
} | ||
} | ||
|
||
val Kotlin2JsCompile.klibs: FileCollection | ||
get() { | ||
return try { | ||
val getClasspath = | ||
AbstractKotlinCompileTool::class.java.getDeclaredMethod("getClasspath") | ||
|
||
val libs: FileCollection = getClasspath.invoke(this) as FileCollection | ||
libs | ||
} catch (exc: NoSuchMethodException) { | ||
libraries.plus(sources) | ||
} | ||
} |
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
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
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
This file was deleted.
Oops, something went wrong.