[gradle-plugin] Fix path to artifacts with prefixes
This commit is contained in:
+6
-3
@@ -62,13 +62,13 @@ abstract class KonanTargetableTask: DefaultTask() {
|
|||||||
abstract class KonanArtifactTask: KonanTargetableTask(), KonanArtifactSpec {
|
abstract class KonanArtifactTask: KonanTargetableTask(), KonanArtifactSpec {
|
||||||
|
|
||||||
open val artifact: File
|
open val artifact: File
|
||||||
@OutputFile get() = destinationDir.resolve(artifactNameWithSuffix)
|
@OutputFile get() = destinationDir.resolve(artifactFullName)
|
||||||
|
|
||||||
@Internal lateinit var destinationDir: File
|
@Internal lateinit var destinationDir: File
|
||||||
@Internal lateinit var artifactName: String
|
@Internal lateinit var artifactName: String
|
||||||
|
|
||||||
protected val artifactNameWithSuffix: String
|
protected val artifactFullName: String
|
||||||
@Internal get() = "$artifactName$artifactSuffix"
|
@Internal get() = "$artifactPrefix$artifactName$artifactSuffix"
|
||||||
|
|
||||||
val artifactPath: String
|
val artifactPath: String
|
||||||
@Internal get() = artifact.canonicalPath
|
@Internal get() = artifact.canonicalPath
|
||||||
@@ -76,6 +76,9 @@ abstract class KonanArtifactTask: KonanTargetableTask(), KonanArtifactSpec {
|
|||||||
protected abstract val artifactSuffix: String
|
protected abstract val artifactSuffix: String
|
||||||
@Internal get
|
@Internal get
|
||||||
|
|
||||||
|
protected abstract val artifactPrefix: String
|
||||||
|
@Internal get
|
||||||
|
|
||||||
internal open fun init(destinationDir: File, artifactName: String, target: KonanTarget) {
|
internal open fun init(destinationDir: File, artifactName: String, target: KonanTarget) {
|
||||||
super.init(target)
|
super.init(target)
|
||||||
this.destinationDir = destinationDir
|
this.destinationDir = destinationDir
|
||||||
|
|||||||
+3
@@ -46,6 +46,9 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
|
|||||||
override val artifactSuffix: String
|
override val artifactSuffix: String
|
||||||
@Internal get() = produce.kind.suffix(konanTarget)
|
@Internal get() = produce.kind.suffix(konanTarget)
|
||||||
|
|
||||||
|
override val artifactPrefix: String
|
||||||
|
@Internal get() = produce.kind.prefix(konanTarget)
|
||||||
|
|
||||||
// Other compilation parameters -------------------------------------------
|
// Other compilation parameters -------------------------------------------
|
||||||
|
|
||||||
protected val srcFiles_ = mutableSetOf<FileCollection>()
|
protected val srcFiles_ = mutableSetOf<FileCollection>()
|
||||||
|
|||||||
+3
@@ -44,6 +44,9 @@ open class KonanInteropTask: KonanBuildingTask(), KonanInteropSpec {
|
|||||||
override val artifactSuffix: String
|
override val artifactSuffix: String
|
||||||
@Internal get() = ".klib"
|
@Internal get() = ".klib"
|
||||||
|
|
||||||
|
override val artifactPrefix: String
|
||||||
|
@Internal get() = ""
|
||||||
|
|
||||||
// Interop stub generator parameters -------------------------------------
|
// Interop stub generator parameters -------------------------------------
|
||||||
|
|
||||||
@InputFile lateinit var defFile: File
|
@InputFile lateinit var defFile: File
|
||||||
|
|||||||
Reference in New Issue
Block a user