Skip to content

Commit 74660d6

Browse files
committed
fix(integrations): fix Java unresolved references
1 parent 6be59df commit 74660d6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/integrations/src/gen-integrations.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ async function prepareAndroid({
2626
slug
2727
}: Context) {
2828
const identifier = slug('.').toLowerCase()
29-
const classSlug = `${slug()}Integration`
3029
const {
3130
maven: {
3231
repo = undefined,
@@ -35,11 +34,11 @@ async function prepareAndroid({
3534
).toLowerCase()}`,
3635
version = '+@aar'
3736
} = {},
38-
factory: {
39-
class: factoryClass = classSlug,
40-
import: factoryImport = `com.segment.analytics.android.integrations.${identifier}.${classSlug}`
41-
} = {}
37+
factory: { class: factoryClass = `${slug()}Integration` } = {}
4238
} = android
39+
const {
40+
import: factoryImport = `com.segment.analytics.android.integrations.${identifier}.${factoryClass}`
41+
} = android.factory || {}
4342
const classpath = `com.segment.analytics.reactnative.integration.${identifier}`
4443
const dependency = `${depName}:${version}`
4544
const root = 'android/src/main'

0 commit comments

Comments
 (0)