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