Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile everything statically #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,7 @@ publishing {
}
}
}

tasks.withType(GroovyCompile).each {
it.groovyOptions.configurationScript = file("$rootDir/gradle/compiler-config.groovy")
}
5 changes: 5 additions & 0 deletions gradle/compiler-config.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import groovy.transform.CompileStatic

withConfig(configuration) {
ast(CompileStatic)
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ abstract class AbstractDuplicateDependencyClassRule extends GradleLintRule imple
if (!dependencyClasses)
return

def dupeDependencyClasses = dependencyService.artifactsByClass(conf)
.findAll {
def dupeDependencyClasses = dependencyService.artifactsByClass(conf).findAll {
// don't count artifacts that have the same ModuleIdentifier, which are different versions of the same
// module coming from extended configurations that are ultimately conflict resolved away anyway
Collection<ResolvedArtifact> artifacts = it.value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.netflix.nebula.lint.rule.dependency
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.ModuleVersionIdentifier

class TransitiveDuplicateDepenencyClassRule extends AbstractDuplicateDependencyClassRule {
class TransitiveDuplicateDependencyClassRule extends AbstractDuplicateDependencyClassRule {
@Override
protected List<ModuleVersionIdentifier> moduleIds(Configuration conf) {
return transitiveModuleIds(conf) - firstOrderModuleIds(conf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
#

implementation-class=com.netflix.nebula.lint.rule.dependency.TransitiveDuplicateDepenencyClassRule
implementation-class=com.netflix.nebula.lint.rule.dependency.TransitiveDuplicateDependencyClassRule