File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
codyze-core/src/main/kotlin/de/fraunhofer/aisec/codyze Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ fun buildConfig(
85
85
.defaultPasses()
86
86
.optionalLanguage(" de.fraunhofer.aisec.cpg.frontends.python.PythonLanguage" )
87
87
.topLevel(projectOptions.directory.toFile())
88
- .sourceLocations(translationOptions.sources.map { it.toFile() })
88
+ .sourceLocations(
89
+ translationOptions.sources.map { projectOptions.directory.resolve(it).toFile() }
90
+ )
89
91
.build()
90
92
}
Original file line number Diff line number Diff line change
1
+ import groovy.util.Node
2
+ import groovy.util.NodeList
3
+
1
4
/*
2
5
* Copyright (c) 2025, Fraunhofer AISEC. All rights reserved.
3
6
*
@@ -39,6 +42,17 @@ publishing {
39
42
artifactId = " codyze"
40
43
name.set(" Codyze" )
41
44
description.set(" The one-stop shop to the code property graph" )
45
+ withXml {
46
+ // Modify the XML to exclude dependencies that start with "cpg-language-".
47
+ // This is necessary because we do not want to "leak" the dependency to our dynamically activated
48
+ // frontends to the outside
49
+ val dependenciesNode = asNode().children().filterIsInstance<Node >().firstOrNull { it.name().toString() == " {http://maven.apache.org/POM/4.0.0}dependencies" }
50
+ dependenciesNode?.children()?.removeIf {
51
+ it is Node &&
52
+ (it.name().toString() == " {http://maven.apache.org/POM/4.0.0}dependency" ) &&
53
+ ((it.get(" artifactId" ) as ? NodeList )?.text()?.startsWith(" cpg-language-" ) == true )
54
+ }
55
+ }
42
56
}
43
57
}
44
58
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ publishing {
49
49
// Modify the XML to exclude dependencies that start with "cpg-language-".
50
50
// This is necessary because we do not want to "leak" the dependency to our dynamically activated
51
51
// frontends to the outside
52
- var dependenciesNode = asNode().children().filterIsInstance<Node >().firstOrNull { true && it.name().toString() == " {http://maven.apache.org/POM/4.0.0}dependencies" }
52
+ val dependenciesNode = asNode().children().filterIsInstance<Node >().firstOrNull { it.name().toString() == " {http://maven.apache.org/POM/4.0.0}dependencies" }
53
53
dependenciesNode?.children()?.removeIf {
54
54
it is Node &&
55
55
(it.name().toString() == " {http://maven.apache.org/POM/4.0.0}dependency" ) &&
You can’t perform that action at this time.
0 commit comments