Skip to content

Commit

Permalink
Made build K2 ready and remove Gradle warnings (#1564)
Browse files Browse the repository at this point in the history
Made build K2 ready
  • Loading branch information
oxisto authored Jun 13, 2024
1 parent 3f34bc1 commit 4c64a27
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/cpg.common-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ kotlin {
}

tasks.withType<KotlinCompile> {
kotlinOptions {
compilerOptions {
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn", "-Xcontext-receivers")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* \______/ \__| \______/
*
*/
@file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE")

package de.fraunhofer.aisec.cpg.analysis

import de.fraunhofer.aisec.cpg.TranslationResult
Expand Down
6 changes: 0 additions & 6 deletions cpg-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ publishing {
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-Xcontext-receivers")
}
}

tasks.test {
useJUnitPlatform {
if (!project.hasProperty("experimental")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ open class ControlFlowSensitiveDFGPass(ctx: TranslationContext) : EOGStarterPass
val lhs = currentNode.lhs.singleOrNull()
writtenDeclaration = (lhs as? Reference)?.refersTo

if (writtenDeclaration != null && lhs != null) {
if (writtenDeclaration != null) {
val prev = doubleState.declarationsState[writtenDeclaration]
findAndSetProperties(prev?.elements ?: setOf(), currentNode)
// Data flows from the last writes to the lhs variable to this node
Expand Down
6 changes: 0 additions & 6 deletions cpg-language-java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ publishing {
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-Xcontext-receivers")
}
}

dependencies {
api(libs.javaparser)
}

0 comments on commit 4c64a27

Please sign in to comment.