-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use complete project path when filtering subprojects (#278)
fix: complete proj path on subprojects filtering Co-authored-by: damian <[email protected]>
- Loading branch information
1 parent
1596027
commit e216d5c
Showing
3 changed files
with
59 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,10 @@ | |
} | ||
}, | ||
{ | ||
"id": "com.google.guava:guava@32.1.3-jre", | ||
"id": "com.google.guava:guava@33.0.0-jre", | ||
"info": { | ||
"name": "com.google.guava:guava", | ||
"version": "32.1.3-jre" | ||
"version": "33.0.0-jre" | ||
} | ||
}, | ||
{ | ||
|
@@ -33,10 +33,10 @@ | |
} | ||
}, | ||
{ | ||
"id": "com.google.guava:[email protected].1", | ||
"id": "com.google.guava:[email protected].2", | ||
"info": { | ||
"name": "com.google.guava:failureaccess", | ||
"version": "1.0.1" | ||
"version": "1.0.2" | ||
} | ||
}, | ||
{ | ||
|
@@ -54,17 +54,17 @@ | |
} | ||
}, | ||
{ | ||
"id": "org.checkerframework:checker-qual@3.37.0", | ||
"id": "org.checkerframework:checker-qual@3.41.0", | ||
"info": { | ||
"name": "org.checkerframework:checker-qual", | ||
"version": "3.37.0" | ||
"version": "3.41.0" | ||
} | ||
}, | ||
{ | ||
"id": "com.google.errorprone:error_prone_annotations@2.21.1", | ||
"id": "com.google.errorprone:error_prone_annotations@2.23.0", | ||
"info": { | ||
"name": "com.google.errorprone:error_prone_annotations", | ||
"version": "2.21.1" | ||
"version": "2.23.0" | ||
} | ||
}, | ||
{ | ||
|
@@ -74,6 +74,13 @@ | |
"version": "2.11.0" | ||
} | ||
}, | ||
{ | ||
"id": "com.google.guava:[email protected]", | ||
"info": { | ||
"name": "com.google.guava:failureaccess", | ||
"version": "1.0.1" | ||
} | ||
}, | ||
{ | ||
"id": "org.checkerframework:[email protected]", | ||
"info": { | ||
|
@@ -100,7 +107,7 @@ | |
"nodeId": "org.codehaus.groovy:[email protected]" | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:guava@32.1.3-jre" | ||
"nodeId": "com.google.guava:guava@33.0.0-jre" | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]" | ||
|
@@ -113,11 +120,11 @@ | |
"deps": [] | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:guava@32.1.3-jre", | ||
"pkgId": "com.google.guava:guava@32.1.3-jre", | ||
"nodeId": "com.google.guava:guava@33.0.0-jre", | ||
"pkgId": "com.google.guava:guava@33.0.0-jre", | ||
"deps": [ | ||
{ | ||
"nodeId": "com.google.guava:[email protected].1" | ||
"nodeId": "com.google.guava:[email protected].2" | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]" | ||
|
@@ -126,20 +133,17 @@ | |
"nodeId": "com.google.code.findbugs:[email protected]" | ||
}, | ||
{ | ||
"nodeId": "org.checkerframework:checker-qual@3.37.0" | ||
"nodeId": "org.checkerframework:checker-qual@3.41.0" | ||
}, | ||
{ | ||
"nodeId": "com.google.errorprone:error_prone_annotations@2.21.1" | ||
"nodeId": "com.google.errorprone:error_prone_annotations@2.23.0" | ||
} | ||
] | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]", | ||
"pkgId": "com.google.guava:[email protected]", | ||
"deps": [ | ||
{ | ||
"nodeId": "com.google.guava:[email protected]:pruned" | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]:pruned" | ||
}, | ||
|
@@ -149,6 +153,9 @@ | |
{ | ||
"nodeId": "com.google.errorprone:[email protected]" | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]" | ||
}, | ||
{ | ||
"nodeId": "org.checkerframework:[email protected]" | ||
}, | ||
|
@@ -158,8 +165,8 @@ | |
] | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected].1", | ||
"pkgId": "com.google.guava:[email protected].1", | ||
"nodeId": "com.google.guava:[email protected].2", | ||
"pkgId": "com.google.guava:[email protected].2", | ||
"deps": [] | ||
}, | ||
{ | ||
|
@@ -173,25 +180,15 @@ | |
"deps": [] | ||
}, | ||
{ | ||
"nodeId": "org.checkerframework:checker-qual@3.37.0", | ||
"pkgId": "org.checkerframework:checker-qual@3.37.0", | ||
"nodeId": "org.checkerframework:checker-qual@3.41.0", | ||
"pkgId": "org.checkerframework:checker-qual@3.41.0", | ||
"deps": [] | ||
}, | ||
{ | ||
"nodeId": "com.google.errorprone:error_prone_annotations@2.21.1", | ||
"pkgId": "com.google.errorprone:error_prone_annotations@2.21.1", | ||
"nodeId": "com.google.errorprone:error_prone_annotations@2.23.0", | ||
"pkgId": "com.google.errorprone:error_prone_annotations@2.23.0", | ||
"deps": [] | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]:pruned", | ||
"pkgId": "com.google.guava:[email protected]", | ||
"deps": [], | ||
"info": { | ||
"labels": { | ||
"pruned": "true" | ||
} | ||
} | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]:pruned", | ||
"pkgId": "com.google.guava:[email protected]", | ||
|
@@ -217,6 +214,11 @@ | |
"pkgId": "com.google.errorprone:[email protected]", | ||
"deps": [] | ||
}, | ||
{ | ||
"nodeId": "com.google.guava:[email protected]", | ||
"pkgId": "com.google.guava:[email protected]", | ||
"deps": [] | ||
}, | ||
{ | ||
"nodeId": "org.checkerframework:[email protected]", | ||
"pkgId": "org.checkerframework:[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -565,6 +565,26 @@ test('multi-project: correct deps for subproject with the same name, one depende | |
expect(nodeIds.indexOf('joda-time:[email protected]')).toBe(-1); | ||
}); | ||
|
||
test('multi-project: right subproject to scan, using --sub-project', async () => { | ||
const result = await inspect( | ||
'.', | ||
path.join(fixtureDir('subprojects-same-name'), 'build.gradle'), | ||
{ subProject: 'greeter/subproj' }, | ||
); | ||
|
||
expect(result.dependencyGraph.rootPkg.name).toBe( | ||
'subprojects-same-name/greeter/subproj', | ||
); | ||
expect(result.meta!.gradleProjectName).toBe( | ||
'subprojects-same-name/greeter/subproj', | ||
); | ||
expect(result.plugin.meta!.allSubProjectNames).toEqual([ | ||
'greeter', | ||
'subproj', | ||
'greeter/subproj', | ||
]); | ||
}); | ||
|
||
test('multi-project: correct deps for subproject with the same name, one dependent on another, using --sub-project', async () => { | ||
const result = await inspect( | ||
'.', | ||
|