React Nativeのビルドでcom.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1が無いって怒られる

React Nativeのビルドでcom.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1が無いって怒られる
数日ぶりにgradleでコンパイルを実行すると、以下のようなエラーが起こるようになった。プロジェクトには何も変更を加えていない。
<span id="395f" class="pn po io pj b gz pp pq m pr ps">FAILURE: Build failed with an exception.</span><span id="ff4e" class="pn po io pj b gz pt pq m pr ps">* What went wrong:<br></br>A problem occurred configuring project ':app'.<br></br>> A problem occurred configuring project ':react-native-sqlite-2'.<br></br> > Could not resolve all dependencies for configuration ':react-native-sqlite-2:_debugCompile'.<br></br> > Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1.<br></br> Searched in the following locations:<br></br> file:/Users/nora/.m2/repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/.m2/repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> <a class="ag hb" href="https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom" rel="noopener ugc nofollow" target="_blank">https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom</a><br></br> <a class="ag hb" href="https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar" rel="noopener ugc nofollow" target="_blank">https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar</a><br></br> file:/Users/nora/Developments/local/pkpk/inkdrop/inkdrop-mobile/node_modules/react-native/android/com/atla<br></br>ssian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/Developments/local/pkpk/inkdrop/inkdrop-mobile/node_modules/react-native/android/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> <a class="ag hb" href="https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom" rel="noopener ugc nofollow" target="_blank">https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom</a><br></br> <a class="ag hb" href="https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar" rel="noopener ugc nofollow" target="_blank">https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar</a><br></br> file:/Users/nora/Library/Android/sdk/extras/android/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/Library/Android/sdk/extras/android/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> file:/Users/nora/Library/Android/sdk/extras/google/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/Library/Android/sdk/extras/google/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> Required by:<br></br> inkdrop:react-native-sqlite-2:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1</span><span id="efb1" class="pn po io pj b gz pt pq m pr ps">* Try:<br></br>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</span>
調べてみると、どうやら二日前から他の人にも発生する問題のようだ:
この問題は、モジュールに以下の依存の記述がある場合に発生するらしい:
<span id="4774" class="pn po io pj b gz pp pq m pr ps">compile 'com.facebook.react:react-native:+'</span>
このissueを読み進めていくと解決方法が提示されていた。 android/build.gradle に以下のような設定を追記すればよい。
<span id="4cfe" class="pn po io pj b gz pp pq m pr ps">allprojects {<br></br> configurations.all {<br></br> resolutionStrategy {<br></br> eachDependency { DependencyResolveDetails details -><br></br> if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {<br></br> def file = new File("$rootDir/../node_modules/react-native/package.json")<br></br> def version = new groovy.json.JsonSlurper().parseText(file.text).version<br></br> details.useVersion version<br></br> }<br></br> }<br></br> }<br></br> }<br></br>}</span>
この設定によって、全ての依存モジュールが同じreact nativeのバージョンを使うように強制する。
これで自分の環境では解決した。