File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,27 @@ import {
55
66export const withOpacityProjectBuildGradle : ConfigPlugin = ( config ) => {
77 return withProjectBuildGradle ( config , async ( config ) => {
8- if ( ! config . modResults . contents . match ( 'maven.mozilla.org' ) ) {
9- config . modResults . contents = config . modResults . contents . replace (
8+ let { contents } = config . modResults ;
9+
10+ // Add Mozilla maven repository if not present
11+ if ( ! contents . match ( 'maven.mozilla.org' ) ) {
12+ contents = contents . replace (
1013 / m a v e n C e n t r a l \( \) / g,
11- `
12- mavenCentral()
14+ `mavenCentral()
1315 maven { url "https://maven.mozilla.org/maven2/" }`
1416 ) ;
1517 }
18+
19+ // Add jitpack repository if not present
20+ if ( ! contents . match ( 'jitpack.io' ) ) {
21+ contents = contents . replace (
22+ / m a v e n C e n t r a l \( \) / g,
23+ `mavenCentral()
24+ maven { url 'https://jitpack.io' }`
25+ ) ;
26+ }
27+
28+ config . modResults . contents = contents ;
1629 return config ;
1730 } ) ;
1831} ;
You can’t perform that action at this time.
0 commit comments