@@ -75,4 +75,52 @@ boolean pulseDependenciesAreSatisfied() {
7575 return dep. exists()
7676}
7777
78+ // Local SDK development support
79+ // Set anpVersion to:
80+ // - Normal version: "10.2.2" (uses published artifacts)
81+ // - Local with default path: "LOCAL" (uses ../videocloud_android-native-player)
82+ // - Local with custom path: "LOCAL:/path/to/sdk" (uses specified path)
83+
84+ def localSdkPath = null
85+ def useLocalSdk = false
86+
87+ if (anpVersion. startsWith(' LOCAL' )) {
88+ useLocalSdk = true
89+ if (anpVersion. contains(' :' )) {
90+ // LOCAL:/path/to/sdk format
91+ localSdkPath = anpVersion. substring(anpVersion. indexOf(' :' ) + 1 )
92+ } else {
93+ // Just "LOCAL" - use default path
94+ localSdkPath = ' ../videocloud_android-native-player'
95+ }
96+ }
97+
98+ if (useLocalSdk) {
99+ if (file(localSdkPath). exists()) {
100+ println " Found local SDK at ${ localSdkPath} - enabling composite build for seamless development"
101+
102+ includeBuild(localSdkPath) {
103+ dependencySubstitution {
104+ substitute module(' com.brightcove.player:android-sdk' ) using project(' :sdk' )
105+ substitute module(' com.brightcove.player:exoplayer2' ) using project(' :players:exoplayer2' )
106+ substitute module(' com.brightcove.player:android-ima-plugin' ) using project(' :plugins:ima' )
107+ substitute module(' com.brightcove.player:android-dai-plugin' ) using project(' :plugins:ima-dai' )
108+ substitute module(' com.brightcove.player:android-ssai-plugin' ) using project(' :plugins:ssai' )
109+ substitute module(' com.brightcove.player:android-cast-plugin' ) using project(' :plugins:cast' )
110+ substitute module(' com.brightcove.player:android-freewheel-plugin' ) using project(' :plugins:freewheel' )
111+ substitute module(' com.brightcove.player:android-pulse-plugin' ) using project(' :plugins:pulse' )
112+ substitute module(' com.brightcove.player:android-omniture-plugin' ) using project(' :plugins:omniture' )
113+ substitute module(' com.brightcove.player:android-appcompat-plugin' ) using project(' :plugins:appcompat' )
114+ substitute module(' com.brightcove.player:android-thumbnail-plugin' ) using project(' :plugins:thumbnail' )
115+ substitute module(' com.brightcove.player:offline-playback' ) using project(' :plugins:offline-playback' )
116+ substitute module(' com.brightcove.player:android-playback-notification-plugin' ) using project(' :plugins:playback-notification' )
117+ }
118+ }
119+ } else {
120+ throw new GradleException (" Local SDK not found at ${ localSdkPath} . Please check the path or use a published version instead." )
121+ }
122+ } else {
123+ println " Using published Maven artifacts version: ${ anpVersion} "
124+ }
125+
78126
0 commit comments