Skip to content

Commit e0d7b5f

Browse files
committed
debug
1 parent 05ef369 commit e0d7b5f

File tree

2 files changed

+31
-22
lines changed

2 files changed

+31
-22
lines changed

.github/workflows/build_and_test.yml

-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ jobs:
9999
mv archive/dist dist
100100
mv archive/dist.unstripped dist.unstripped
101101
rmdir archive
102-
find dist
103-
find dist.unstripped
104102
shell: bash
105103

106104
- name: 🍺 Install Maestro

test/plugins/withJscAndroid.js

+31-20
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,55 @@
11
const assert = require('assert');
2-
const { withProjectBuildGradle } = require('expo/config-plugins');
2+
const { withAppBuildGradle } = require('expo/config-plugins');
33

4-
const withJscAndroidProjectBuildGradle = (config) => {
5-
return withProjectBuildGradle(config, (config) => {
4+
const withJscAndroidAppBuildGradle = (config) => {
5+
return withAppBuildGradle(config, (config) => {
66
assert(config.modResults.language === 'groovy');
7-
if (!config.modResults.contents.match(/\/\/ Local dist maven repo/)) {
8-
const mavenRepo = `
9-
maven {
10-
// Local dist maven repo
11-
url('../../dist')
12-
}`;
13-
config.modResults.contents = config.modResults.contents.replace(
14-
/^(allprojects \{[\s\S]+?repositories \{)/gm,
15-
`$1${mavenRepo}`
16-
);
17-
}
18-
197
if (
208
!config.modResults.contents.match(
21-
/io\.github\.react-native-community:jsc-android:/
9+
/@generated withJscAndroidAppBuildGradle/
2210
)
2311
) {
24-
config.modResults.contents += `
25-
allprojects {
12+
const code = `
13+
// [begin] @generated withJscAndroidAppBuildGradle
14+
afterEvaluate {
15+
project.rootProject.allprojects {
16+
// Remove original mavenCentral
17+
repositories.removeIf { repo ->
18+
repo instanceof MavenArtifactRepository && repo.url.toString().contains('https://repo.maven.apache.org/maven2')
19+
}
20+
21+
repositories {
22+
maven {
23+
// Local dist maven repo
24+
url("\${rootDir}/../../dist")
25+
}
26+
27+
mavenCentral {
28+
content {
29+
excludeGroup('org.webkit')
30+
excludeGroup('io.github.react-native-community')
31+
}
32+
}
33+
}
34+
}
35+
2636
configurations.all {
2737
resolutionStrategy.dependencySubstitution {
2838
substitute(module('org.webkit:android-jsc'))
2939
.using(module('io.github.react-native-community:jsc-android:+'))
3040
}
3141
}
3242
}
43+
// [end] @generated withJscAndroidAppBuildGradle
3344
`;
45+
config.modResults.contents += code;
3446
}
35-
3647
return config;
3748
});
3849
};
3950

4051
const withJscAndroid = (config) => {
41-
config = withJscAndroidProjectBuildGradle(config);
52+
config = withJscAndroidAppBuildGradle(config);
4253
return config;
4354
};
4455

0 commit comments

Comments
 (0)