mirror of
https://github.com/InsanusMokrassar/KotlinMultiplatformProjectTemplate.git
synced 2024-11-21 15:53:55 +00:00
Compare commits
2 Commits
892ba37857
...
575f4ea7ee
Author | SHA1 | Date | |
---|---|---|---|
|
575f4ea7ee | ||
896028d0bb |
@ -4,5 +4,5 @@ plugins {
|
|||||||
id "com.android.library"
|
id "com.android.library"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$mppAndroidProjectPresetPath"
|
apply from: "$mppAndroidProject"
|
||||||
|
|
||||||
|
@ -3,5 +3,5 @@ plugins {
|
|||||||
id "org.jetbrains.kotlin.plugin.serialization"
|
id "org.jetbrains.kotlin.plugin.serialization"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$mppJavaProjectPresetPath"
|
apply from: "$mppJavaProject"
|
||||||
|
|
||||||
|
@ -3,5 +3,5 @@ plugins {
|
|||||||
id "org.jetbrains.kotlin.plugin.serialization"
|
id "org.jetbrains.kotlin.plugin.serialization"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$mppJsProjectPresetPath"
|
apply from: "$mppJsProject"
|
||||||
|
|
||||||
|
@ -4,5 +4,5 @@ plugins {
|
|||||||
id "com.android.library"
|
id "com.android.library"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$mppProjectWithSerializationPresetPath"
|
apply from: "$mppProjectWithSerialization"
|
||||||
|
|
||||||
|
@ -1,25 +1,32 @@
|
|||||||
allprojects {
|
File templatesFolder = new File("$rootProject.projectDir.absolutePath${File.separatorChar}gradle${File.separatorChar}templates")
|
||||||
ext {
|
|
||||||
projectByName = { String name ->
|
|
||||||
for (subproject in rootProject.subprojects) {
|
|
||||||
if (subproject.name == name) {
|
|
||||||
return subproject
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
internalProject = { String name ->
|
Map properties = new HashMap<String, String>()
|
||||||
projectByName(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
mppProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerialization.gradle"
|
if (templatesFolder.exists() && templatesFolder.isDirectory()) {
|
||||||
mppJavaProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJavaProject.gradle"
|
templatesFolder.listFiles().each {
|
||||||
mppJsProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJsProject.gradle"
|
properties[it.name - ".gradle"] = it.absolutePath
|
||||||
mppAndroidProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppAndroidProject.gradle"
|
}
|
||||||
|
}
|
||||||
defaultAndroidSettingsPresetPath = "${rootProject.projectDir.absolutePath}/defaultAndroidSettings.gradle"
|
|
||||||
|
properties["projectByName"] = { name ->
|
||||||
// publishGradlePath = "${rootProject.projectDir.absolutePath}/publish.gradle"
|
for (subproject in rootProject.subprojects) {
|
||||||
|
if (subproject.name == name) {
|
||||||
|
return subproject
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
properties["internalProject"] = { name ->
|
||||||
|
projectByName("$name")
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
ext {
|
||||||
|
releaseMode = (project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true"
|
||||||
|
|
||||||
|
properties.forEach { k, v ->
|
||||||
|
it[k] = v
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,4 +36,4 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$defaultAndroidSettingsPresetPath"
|
apply from: "$defaultAndroidSettings"
|
@ -62,4 +62,4 @@ java {
|
|||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$defaultAndroidSettingsPresetPath"
|
apply from: "$defaultAndroidSettings"
|
@ -4,5 +4,5 @@ plugins {
|
|||||||
id "com.android.library"
|
id "com.android.library"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$mppProjectWithSerializationPresetPath"
|
apply from: "$mppProjectWithSerialization"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user