A kludgy way to get the native to properly compile when in intellij IDE
This commit is contained in:
		
							parent
							
								
									cb7ca575ab
								
							
						
					
					
						commit
						84799b4ede
					
				| @ -49,7 +49,12 @@ repositories { | |||||||
| group = "com.ionspin.kotlin" | group = "com.ionspin.kotlin" | ||||||
| version = "0.0.3-SNAPSHOT" | version = "0.0.3-SNAPSHOT" | ||||||
| 
 | 
 | ||||||
|  | val ideaActive = System.getProperty("idea.active") == "true" | ||||||
|  | 
 | ||||||
| kotlin { | kotlin { | ||||||
|  |     if (ideaActive) { | ||||||
|  |         linuxX64("native") | ||||||
|  |     } | ||||||
|     jvm() |     jvm() | ||||||
|     js { |     js { | ||||||
|         compilations { |         compilations { | ||||||
| @ -194,15 +199,35 @@ kotlin { | |||||||
|                 implementation(kotlin("test-js")) |                 implementation(kotlin("test-js")) | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |         val nativeMain = if (ideaActive) { | ||||||
|  |             val nativeMain by getting { | ||||||
|  |                 dependsOn(commonMain) | ||||||
|  |             } | ||||||
|  |             nativeMain | ||||||
|  |         } else { | ||||||
|             val nativeMain by creating { |             val nativeMain by creating { | ||||||
|                 dependsOn(commonMain) |                 dependsOn(commonMain) | ||||||
|             } |             } | ||||||
|  |             nativeMain | ||||||
|  |         } | ||||||
|  |         val nativeTest = if (ideaActive) { | ||||||
|  |             val nativeTest by getting { | ||||||
|  |                 dependsOn(commonTest) | ||||||
|  |                 dependencies { | ||||||
|  |                     implementation(Deps.Native.coroutines) | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             nativeTest | ||||||
|  |         } else { | ||||||
|             val nativeTest by creating { |             val nativeTest by creating { | ||||||
|                 dependsOn(commonTest) |                 dependsOn(commonTest) | ||||||
|                 dependencies { |                 dependencies { | ||||||
|                     implementation(Deps.Native.coroutines) |                     implementation(Deps.Native.coroutines) | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |             nativeTest | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|          |          | ||||||
|         val iosMain by getting { |         val iosMain by getting { | ||||||
|             dependsOn(nativeMain) |             dependsOn(nativeMain) | ||||||
|  | |||||||
| @ -24,6 +24,7 @@ import kotlin.test.assertTrue | |||||||
|  * ugljesa.jovanovic@ionspin.com |  * ugljesa.jovanovic@ionspin.com | ||||||
|  * on 05-Jan-2020 |  * on 05-Jan-2020 | ||||||
|  */ |  */ | ||||||
|  | @ExperimentalUnsignedTypes | ||||||
| class SRNGJsTest { | class SRNGJsTest { | ||||||
| 
 | 
 | ||||||
|     @Test |     @Test | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user