Compare commits

...

5 Commits

Author SHA1 Message Date
Sergey Strekalov 59a13fcbe7 Merge pull request 'MAN-2775: Добавлены правила' (#29) from MAN-BuildScript into detached4
Reviewed-on: #29
2026-04-06 14:02:59 +03:00
Strekalov Sergey e04131eefe MAN-2775: Добавлены правила 2026-04-06 13:40:50 +03:00
Bogdan Terehov d4d0d1b75d create string file if this not exist 2025-10-23 17:17:20 +03:00
Anton Badretdinov 60b1e4a3e9 update BuildScripts plugins 2025-04-09 16:05:59 +03:00
Anton Badretdinov d6315b283d Add core:base_feature and core:strings modules 2025-04-08 12:10:55 +03:00
8 changed files with 46 additions and 4 deletions

View File

@ -52,7 +52,7 @@ abstract class ApiGeneratorPlugin : Plugin<Project> {
val outputLanguage = extension.outputLanguage ?: throw IllegalStateException("Configure output language code for api generator plugin") val outputLanguage = extension.outputLanguage ?: throw IllegalStateException("Configure output language code for api generator plugin")
javaexec { javaexec {
main = "-jar" mainClass.set("-jar")
workingDir = rootDir workingDir = rootDir
args = listOfNotNull( args = listOfNotNull(
configurations.getByName("apiGenerator").asPath, configurations.getByName("apiGenerator").asPath,

View File

@ -63,7 +63,7 @@ class SwaggerApiGeneratorAndroidPlugin : Plugin<Project> {
workingDir = file(taskWorkingDir) workingDir = file(taskWorkingDir)
classpath = files(configurations.getByName(GENERATOR_CONFIG).asPath, classpath = files(configurations.getByName(GENERATOR_CONFIG).asPath,
configurations.getByName(TI_GENERATOR_CONFIG).asPath) configurations.getByName(TI_GENERATOR_CONFIG).asPath)
main = "io.swagger.codegen.v3.cli.SwaggerCodegen" mainClass.set("io.swagger.codegen.v3.cli.SwaggerCodegen")
args = listOfNotNull( args = listOfNotNull(
"generate", "generate",
"-i", "-i",

View File

@ -42,7 +42,7 @@ class CpdLinter : Linter {
} }
tasks.withType<Cpd> { tasks.withType<Cpd> {
reports.xml.required.set(true) reports.xml.required.set(true)
reports.xml.destination = getCpdReportFile() reports.xml.outputLocation.set(getCpdReportFile())
ignoreFailures = true ignoreFailures = true
source = getSources(extension.excludes) source = getSources(extension.excludes)
} }

View File

@ -2,7 +2,7 @@ import groovy.json.JsonSlurper
import groovy.xml.MarkupBuilder import groovy.xml.MarkupBuilder
task stringGenerator { task stringGenerator {
generate(android.languageMap, project) generate(android.languageMap, project.rootProject.findProject(":core:strings"))
println("Strings generated!") println("Strings generated!")
} }
@ -32,6 +32,11 @@ private def generate(Map<String, String> sources, Project project) {
} }
def stringsFile = getFile(key, key == defaultLang, project) def stringsFile = getFile(key, key == defaultLang, project)
if (!stringsFile.exists()) {
stringsFile.parentFile.mkdirs()
stringsFile.createNewFile()
}
stringsFile.write(sw.toString(), "UTF-8") stringsFile.write(sw.toString(), "UTF-8")
} }
} }

View File

@ -7,3 +7,7 @@
-include rules/kaspersky.pro -include rules/kaspersky.pro
-include rules/appsflyer.pro -include rules/appsflyer.pro
-include rules/moshi.pro -include rules/moshi.pro
-include rules/androidx_security.pro
-include rules/kotlinx_serialization.pro
-include rules/workmanager.pro
-include rules/navigation.pro

View File

@ -0,0 +1,21 @@
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt
-keepclassmembers class kotlinx.serialization.json.** { *** Companion; }
-keepclasseswithmembers class kotlinx.serialization.json.** {
kotlinx.serialization.KSerializer serializer(...);
}
-keepclasseswithmembers class **$$serializer {
static **$$serializer INSTANCE;
}
-keepclassmembers @kotlinx.serialization.Serializable class ** {
static **$serializer INSTANCE;
static kotlinx.serialization.KSerializer serializer(...);
*** Companion;
*** INSTANCE;
kotlinx.serialization.KSerializer serializer();
}
-keep @kotlinx.serialization.Serializable class * { *; }

View File

@ -0,0 +1,4 @@
-keepnames class * implements com.manzherok.mobile.corenavigation.Route
-keep class * implements com.manzherok.mobile.corenavigation.Route {
public java.lang.String getName();
}

View File

@ -0,0 +1,8 @@
-keep class * extends androidx.work.Worker { *; }
-keep class * extends androidx.work.CoroutineWorker { *; }
-keep class * extends androidx.work.ListenableWorker {
public <init>(android.content.Context, androidx.work.WorkerParameters);
}
-keepclasseswithmembers class * {
@dagger.assisted.AssistedInject <init>(...);
}