Cache dependancies, add proper path to custom libsodium npm module
This commit is contained in:
		
							parent
							
								
									9255bc44fa
								
							
						
					
					
						commit
						6612d8a37b
					
				@ -48,6 +48,7 @@ cache:
 | 
				
			|||||||
    - $HOME/.gradle/caches/
 | 
					    - $HOME/.gradle/caches/
 | 
				
			||||||
    - $HOME/.gradle/wrapper/
 | 
					    - $HOME/.gradle/wrapper/
 | 
				
			||||||
    - $HOME/.konan/cache
 | 
					    - $HOME/.konan/cache
 | 
				
			||||||
 | 
					    - $HOME/.konan/dependencies
 | 
				
			||||||
branches:
 | 
					branches:
 | 
				
			||||||
  only:
 | 
					  only:
 | 
				
			||||||
    - master
 | 
					    - master
 | 
				
			||||||
 | 
				
			|||||||
@ -29,3 +29,6 @@ repositories {
 | 
				
			|||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
    implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4-M2")
 | 
					    implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4-M2")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					System.setProperty("PROJECT_PATH", project.projectDir.parentFile.toString())
 | 
				
			||||||
 | 
					println("Path ${project.projectDir.parentFile}")
 | 
				
			||||||
 | 
				
			|||||||
@ -63,7 +63,7 @@ object Deps {
 | 
				
			|||||||
        object Npm {
 | 
					        object Npm {
 | 
				
			||||||
            val libsodium = Pair("libsodium-wrappers-sumo", "0.7.6")
 | 
					            val libsodium = Pair("libsodium-wrappers-sumo", "0.7.6")
 | 
				
			||||||
//            val libsodiumWrappers = Pair("libsodium-wrappers-sumo", "0.7.6")
 | 
					//            val libsodiumWrappers = Pair("libsodium-wrappers-sumo", "0.7.6")
 | 
				
			||||||
            val libsodiumWrappers = Pair("libsodium-wrappers-sumo", "file:/home/ionspin/Projects/Future/kotlin-multiplatform-crypto/multiplatform-crypto-delegated/libsodium-wrappers-sumo-0.7.6.tgz")
 | 
					            val libsodiumWrappers = Pair("libsodium-wrappers-sumo", "file:${getProjectPath()}/multiplatform-crypto-delegated/libsodium-wrappers-sumo-0.7.6.tgz")
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -4,6 +4,7 @@ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
 | 
				
			|||||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
 | 
					import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
 | 
				
			||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
 | 
					import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
 | 
				
			||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
 | 
					import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
 | 
				
			||||||
 | 
					import java.io.File
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Created by Ugljesa Jovanovic
 | 
					 * Created by Ugljesa Jovanovic
 | 
				
			||||||
@ -14,6 +15,11 @@ fun isInIdea() = System.getProperty("idea.active") == "true"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
fun isInTravis() = System.getenv("TRAVIS") == "true"
 | 
					fun isInTravis() = System.getenv("TRAVIS") == "true"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					fun getProjectPath() : String {
 | 
				
			||||||
 | 
					    val path = System.getProperty("PROJECT_PATH")
 | 
				
			||||||
 | 
					    return path
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fun getHostOsName(): String {
 | 
					fun getHostOsName(): String {
 | 
				
			||||||
    val target = System.getProperty("os.name")
 | 
					    val target = System.getProperty("os.name")
 | 
				
			||||||
    if (target == "Linux") return "linux"
 | 
					    if (target == "Linux") return "linux"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user