我有 2 个模块,第一个是module-to-publish,第二个是module-base。现在我想module-to-publish用里面的内容发布到mavenCentral module-base。我应该做什么来包含module-base.
旧实体如下:
@Entity(tableName = "d_course",
foreignKeys = @ForeignKey(entity = DUser.class, parentColumns = "id", childColumns = "studio"),
indices = @Index(value = "studio"))
Run Code Online (Sandbox Code Playgroud)
新的实体如下:
@Entity(tableName = "d_course",
foreignKeys = @ForeignKey(entity = DUser.class, parentColumns = "id", childColumns = "studio"),
indices = @Index(value = {"id", "studio"}))
Run Code Online (Sandbox Code Playgroud)
如何迁移此索引更改。
我制作了一个 android 库,将其发布到 jcenter 的多个版本。但是当我使用它时,我从自己的库中找到了R和BuildConfig参考。如何避免上传R和BuildConfig。这是我的 build.gradle:
version = "2.1.3"
def siteUrl = 'https://github.com/boybeak/DelegateAdapter'
def gitUrl = 'https://github.com/boybeak/DelegateAdapter.git'
group = "com.github.boybeak"
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
name 'DelegateAdapter'
url siteUrl
licenses {
license {
name 'Apache-2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'boybeak'
name 'gaoyunfei'
email 'boybeak@qq.com'
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
task sourcesJar(type: Jar) { …Run Code Online (Sandbox Code Playgroud) body: const Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: WebView(
initialUrl: "https://xxxx",
navigationDelegate: (navigation) {
return NavigationDecision.navigate;
},
),
),
Run Code Online (Sandbox Code Playgroud)
编译的时候,发生了错误。
lib/main.dart:84:31: Error: Not a constant expression.
navigationDelegate: (navigation) {
^^^^^^^^^^^^
Run Code Online (Sandbox Code Playgroud)
当我使用flutter-2.2.0and时webview_flutter-2.0.13,上面的代码工作正常。但是当我将 flutter 升级到 2.5.2 并将 webview_flutter 升级到 2.0.13 后,发生了错误。环境(颤振2.5.2):
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
webview_flutter: 2.1.1
Run Code Online (Sandbox Code Playgroud)