mirror of
				https://github.com/InsanusMokrassar/MicroUtils.git
				synced 2025-11-03 21:51:59 +00:00 
			
		
		
		
	fix for repos in building
This commit is contained in:
		@@ -1,5 +1,21 @@
 | 
			
		||||
apply plugin: 'com.getkeepsafe.dexcount'
 | 
			
		||||
 | 
			
		||||
ext {
 | 
			
		||||
    enableIncludingJvmCodeInAndroidPart = {
 | 
			
		||||
        String sep = File.separator
 | 
			
		||||
        File jvmKotlinFolder = new File("${project.projectDir}${sep}src${sep}jvmMain${sep}kotlin")
 | 
			
		||||
        if (jvmKotlinFolder.exists()) {
 | 
			
		||||
            android.sourceSets.main.java.srcDirs += jvmKotlinFolder.path
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    disableIncludingJvmCodeInAndroidPart = {
 | 
			
		||||
        String sep = File.separator
 | 
			
		||||
        File jvmKotlinFolder = new File("${project.projectDir}${sep}src${sep}jvmMain${sep}kotlin")
 | 
			
		||||
        android.sourceSets.main.java.srcDirs -= jvmKotlinFolder.path
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
android {
 | 
			
		||||
    compileSdkVersion "$android_compileSdkVersion".toInteger()
 | 
			
		||||
    buildToolsVersion "$android_buildToolsVersion"
 | 
			
		||||
@@ -37,9 +53,6 @@ android {
 | 
			
		||||
    sourceSets {
 | 
			
		||||
        String sep = File.separator
 | 
			
		||||
        main.java.srcDirs += "src${sep}main${sep}kotlin"
 | 
			
		||||
        File jvmKotlinFolder = new File("${project.projectDir}${sep}src${sep}jvmMain${sep}kotlin")
 | 
			
		||||
        if (jvmKotlinFolder.exists()) {
 | 
			
		||||
            main.java.srcDirs += jvmKotlinFolder.path
 | 
			
		||||
        }
 | 
			
		||||
        enableIncludingJvmCodeInAndroidPart()
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -31,3 +31,5 @@ kotlin {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
disableIncludingJvmCodeInAndroidPart()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user