• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / MooseNexus / 12725447942

11 Jan 2025 03:30PM UTC coverage: 36.509% (+1.6%) from 34.906%
12725447942

push

github

Gabriel-Darbord
Remove dead test class

525 of 1438 relevant lines covered (36.51%)

1.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/MooseNexus/NexusGradleRepository.class.st
1
"
2
I am responsible for finding dependencies in a local Gradle repository.
3
"
4
Class {
5
        #name : 'NexusGradleRepository',
6
        #superclass : 'NexusDependencyRepository',
7
        #classInstVars : [
8
                'default'
9
        ],
10
        #category : 'MooseNexus-Repository',
11
        #package : 'MooseNexus',
12
        #tag : 'Repository'
13
}
14

15
{ #category : 'accessing' }
16
NexusGradleRepository class >> default [
×
17

×
18
        ^ default ifNil: [
×
19
                  default := self new directory:
×
20
                                     '.gradle/caches/modules-2/files-2.1' ]
×
21
]
×
22

23
{ #category : 'resolving' }
24
NexusGradleRepository >> findGroup: group name: name version: version type: type [
×
25
        "Search for an artifact (a file) based on its descriptor."
×
26

×
27
        | artifactDirectory fileName |
×
28
        (artifactDirectory := FileLocator home / directory / group / name
×
29
                              / version) ifAbsent: [ ^ nil ].
×
30
        fileName := name , '-' , version , '.' , type.
×
31

×
32
        "Gradle can have multiple directories named with a UUID at this level,
×
33
        any will do (make an issue if not!) as long as it contains the artifact."
×
34
        artifactDirectory directories do: [ :dir |
×
35
                dir / fileName ifExists: [ :artifact | ^ artifact ] ].
×
36
        ^ nil
×
37
]
×
38

39
{ #category : 'resolving' }
40
NexusGradleRepository >> resolve: descriptor [
×
41

×
42
        | parts group name type version scope path artifact |
×
43
        parts := $: split: descriptor.
×
44
        group := parts at: 1.
×
45
        name := parts at: 2.
×
46
        type := parts at: 3.
×
47
        version := parts at: 4.
×
48
        scope := parts at: 5.
×
49
        path := parts at: 6.
×
50

×
51
        artifact := path asFileReference ifAbsent: [
×
52
                            (self
×
53
                                     findGroup: group
×
54
                                     name: name
×
55
                                     version: version
×
56
                                     type: type) ifNil: [ ^ nil ] ].
×
57

×
58
        ^ group -> (Dictionary
×
59
                   with: #name -> name
×
60
                   with: #version -> version
×
61
                   with: #type -> type
×
62
                   with: #scope -> scope
×
63
                   with: #path -> (artifact relativeTo: FileLocator home) pathString)
×
64
]
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc