@invarn/cli 0.9.364 → 0.9.366
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capture/android/VERSION +1 -1
- package/dist/capture/android/capture-build.cjs +1 -1
- package/dist/capture/android/controller.cjs +1 -1
- package/dist/capture/android/index.cjs +1 -1
- package/dist/capture/android/invarn-agent-0.137.0.aar +0 -0
- package/dist/capture/android/verify-apk.cjs +1 -1
- package/dist/capture/ios/InvarnAgent-0.94.0.dylib +0 -0
- package/dist/capture/ios/InvarnComposeReader-0.94.0/VERSION +1 -0
- package/dist/capture/ios/InvarnComposeReader-0.94.0/invarn-compose.gradle +168 -0
- package/dist/capture/ios/{InvarnComposeReader-0.90.0.tar → InvarnComposeReader-0.94.0.tar} +0 -0
- package/dist/capture/ios/{InvarnFold-0.90.0 → InvarnFold-0.94.0} +0 -0
- package/dist/capture/ios/{InvarnHinge-0.90.0 → InvarnHinge-0.94.0} +0 -0
- package/dist/capture/ios/{InvarnQuit-0.90.0 → InvarnQuit-0.94.0} +0 -0
- package/dist/capture/ios/{InvarnReencode-0.90.0 → InvarnReencode-0.94.0} +0 -0
- package/dist/capture/ios/{InvarnSystemRunner-0.90.0.dylib → InvarnSystemRunner-0.94.0.dylib} +0 -0
- package/dist/capture/ios/VERSION +1 -1
- package/dist/capture/ios/capture-build.cjs +1 -1
- package/dist/capture/ios/controller.cjs +1 -1
- package/dist/capture/ios/index.cjs +1 -1
- package/dist/invarn.cjs +24 -24
- package/dist/local-run-worker.mjs +1 -1
- package/dist/sdk.mjs +30 -38
- package/package.json +1 -1
- package/dist/capture/android/invarn-agent-0.136.0.aar +0 -0
- package/dist/capture/ios/InvarnAgent-0.90.0.dylib +0 -0
- package/dist/capture/ios/InvarnComposeReader-0.90.0/VERSION +0 -1
- package/dist/capture/ios/InvarnComposeReader-0.90.0/invarn-compose.gradle +0 -90
- /package/dist/capture/android/{invarn-init-0.136.0.gradle → invarn-init-0.137.0.gradle} +0 -0
- /package/dist/capture/android/{invarn-instrument-0.136.0.jar → invarn-instrument-0.137.0.jar} +0 -0
- /package/dist/capture/android/{invarn-reader-0.136.0.jar → invarn-reader-0.137.0.jar} +0 -0
- /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/scan.groovy +0 -0
- /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Ivx.kt +0 -0
- /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zmn0.kt +0 -0
- /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Znn0.kt +0 -0
- /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zpn0.kt +0 -0
- /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zqn0.kt +0 -0
- /package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zsn0.kt +0 -0
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.90.0
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
def readerHome = System.getenv('INVARN_COMPOSE_READER') ?: buildscript.sourceFile?.parentFile?.absolutePath
|
|
2
|
-
def FLOOR = [1, 10, 0]
|
|
3
|
-
def READER = (new File(readerHome, 'VERSION').with { it.exists() ? it.text.trim() : 'dev' })
|
|
4
|
-
|
|
5
|
-
def versionOf = { String v -> (v =~ /^(\d+)\.(\d+)(?:\.(\d+))?/).with { m -> m.find() ? [m.group(1) as int, m.group(2) as int, (m.group(3) ?: '0') as int] : null } }
|
|
6
|
-
def atLeast = { List a, List b -> for (int i = 0; i < 3; i++) { if (a[i] != b[i]) return a[i] > b[i] }; true }
|
|
7
|
-
|
|
8
|
-
gradle.beforeProject { p ->
|
|
9
|
-
p.pluginManager.withPlugin('org.jetbrains.kotlin.plugin.compose') {
|
|
10
|
-
def ext = p.extensions.findByName('composeCompiler')
|
|
11
|
-
if (ext != null && ext.hasProperty('includeSourceInformation')) ext.includeSourceInformation.set(true)
|
|
12
|
-
}
|
|
13
|
-
p.pluginManager.withPlugin('org.jetbrains.kotlin.multiplatform') {
|
|
14
|
-
p.afterEvaluate {
|
|
15
|
-
def kotlin = p.extensions.getByName('kotlin')
|
|
16
|
-
kotlin.targets.each { t ->
|
|
17
|
-
if (!t.hasProperty('konanTarget') || t.konanTarget.family.name() != 'IOS') return
|
|
18
|
-
if (!t.binaries.any { it.getClass().name.contains('Framework') }) return
|
|
19
|
-
def main = t.compilations.getByName('main')
|
|
20
|
-
def classpath = main.compileDependencyFiles
|
|
21
|
-
def out = p.layout.buildDirectory.dir("generated/invarn-compose/${t.name}")
|
|
22
|
-
def gen = p.tasks.register("invarnComposeReader${t.name.capitalize()}") { task ->
|
|
23
|
-
task.outputs.dir(out)
|
|
24
|
-
task.outputs.upToDateWhen { false }
|
|
25
|
-
task.doLast {
|
|
26
|
-
def dir = out.get().asFile
|
|
27
|
-
dir.deleteDir(); dir.mkdirs()
|
|
28
|
-
def found = []
|
|
29
|
-
classpath.files.each { f ->
|
|
30
|
-
def m = (f.absolutePath =~ /compose[\/.]runtime[\/.]runtime-(?:ios|uikit)[a-z0-9]*[\/.](\d[^\/]*)[\/]/)
|
|
31
|
-
if (m.find()) { def v = versionOf(m.group(1)); if (v) found << v }
|
|
32
|
-
}
|
|
33
|
-
def runtime = found.max { a, b -> atLeast(a, b) ? (a == b ? 0 : 1) : -1 }
|
|
34
|
-
if (runtime == null || !atLeast(runtime, FLOOR)) {
|
|
35
|
-
p.logger.lifecycle("[invarn-compose] ${p.path} ${t.name}: no reader (Compose runtime ${runtime ? runtime.join('.') : 'not found'}, reader needs ${FLOOR.join('.')} or later)")
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
['src'].each { sub -> new File(readerHome, sub).eachFileRecurse { f -> if (f.name.endsWith('.kt')) new File(dir, f.name).text = f.text } }
|
|
39
|
-
def zvg0 = new TreeSet<String>()
|
|
40
|
-
def zhk0 = new TreeMap<String, String>()
|
|
41
|
-
def scanFile = new File(readerHome, 'scan.groovy')
|
|
42
|
-
def scanner = scanFile.exists() ? new GroovyShell(getClass().classLoader).evaluate(scanFile) : null
|
|
43
|
-
def ztm0 = new TreeSet<String>()
|
|
44
|
-
def buildSrc = new File(p.rootDir, 'buildSrc').canonicalPath
|
|
45
|
-
def root = p.rootDir
|
|
46
|
-
def home = p.gradle.gradleUserHomeDir.canonicalPath
|
|
47
|
-
def walk
|
|
48
|
-
walk = { File d ->
|
|
49
|
-
d.listFiles()?.each { f ->
|
|
50
|
-
if (f.isDirectory()) {
|
|
51
|
-
if (f.name == 'build' || f.name.startsWith('.') || f.canonicalPath == home) return
|
|
52
|
-
walk(f)
|
|
53
|
-
} else if (f.name.endsWith('.kt')) {
|
|
54
|
-
def pm = (f.text =~ /(?m)^\s*package\s+([A-Za-z_`][\w.`]*)/)
|
|
55
|
-
def pkg = pm.find() ? pm.group(1).replace('`', '') : ''
|
|
56
|
-
def key = f.name + '#' + Integer.toString(Math.abs(pkg.hashCode()), 36)
|
|
57
|
-
zvg0 << key
|
|
58
|
-
zhk0[key] = pkg
|
|
59
|
-
if (scanner != null && !scanner.inTestSources(f) && !f.canonicalPath.startsWith(buildSrc + File.separator))
|
|
60
|
-
scanner.scan(f.text, { String l -> ztm0 << String.format('%016x', scanner.hash(l)) } as java.util.function.Consumer)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
walk(root)
|
|
65
|
-
def literal = { String joined ->
|
|
66
|
-
def chunks = []
|
|
67
|
-
for (int i = 0; i < joined.length(); i += 20000) chunks << joined.substring(i, Math.min(joined.length(), i + 20000))
|
|
68
|
-
chunks.collect { '"' + it.replace('\\', '\\\\').replace('"', '\\"').replace('$', '\\$').replace('\n', '\\n') + '"' }.join(' +\n ')
|
|
69
|
-
}
|
|
70
|
-
def lit = literal(zvg0.join('\n'))
|
|
71
|
-
def pkgs = literal(zhk0.collect { k, v -> k + '=' + v }.join('\n'))
|
|
72
|
-
def hashes = literal(ztm0.join('\n'))
|
|
73
|
-
new File(dir, 'zmb0.kt').text = """package zp6
|
|
74
|
-
|
|
75
|
-
internal object zmb0 {
|
|
76
|
-
val zvg0: Set<String>? = (${lit ?: '""'}).split('\\n').filter { it.isNotEmpty() }.toSet().takeIf { it.isNotEmpty() }
|
|
77
|
-
val zhk0: Map<String, String>? = (${pkgs ?: '""'}).split('\\n').filter { it.contains('=') }
|
|
78
|
-
.associate { it.substringBefore('=') to it.substringAfter('=') }.takeIf { it.isNotEmpty() }
|
|
79
|
-
val ztm0: LongArray? = (${hashes ?: '""'}).split('\\n').filter { it.isNotEmpty() }.map { it.toULong(16).toLong() }
|
|
80
|
-
.toLongArray().also { it.sort() }.takeIf { it.isNotEmpty() }
|
|
81
|
-
}
|
|
82
|
-
"""
|
|
83
|
-
p.logger.lifecycle("[invarn-compose] ${p.path} ${t.name}: reader ${READER} added (Compose runtime ${runtime.join('.')}, ${zvg0.size()} Kotlin files, ${ztm0.size()} literals)")
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
main.defaultSourceSet.kotlin.srcDir(gen)
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
File without changes
|
/package/dist/capture/android/{invarn-instrument-0.136.0.jar → invarn-instrument-0.137.0.jar}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/scan.groovy
RENAMED
|
File without changes
|
/package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Ivx.kt
RENAMED
|
File without changes
|
/package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zmn0.kt
RENAMED
|
File without changes
|
/package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Znn0.kt
RENAMED
|
File without changes
|
/package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zpn0.kt
RENAMED
|
File without changes
|
/package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zqn0.kt
RENAMED
|
File without changes
|
/package/dist/capture/ios/{InvarnComposeReader-0.90.0 → InvarnComposeReader-0.94.0}/src/Zsn0.kt
RENAMED
|
File without changes
|