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