2
私は会社の内部使用のための簡単なアンドロイドアプリケーションを持っています。私は簡単なバージョンのトラッキングを作成したいと思います。 だから、それを実装するために私は私のbuild.gradleファイルにいくつかのコードを追加:versionCodeを現在の日付に設定する
apply plugin: 'com.android.application'
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:0.12.0"
classpath 'org.moallemi.gradle.advanced-build-version:gradle-pugin:1.5.3'
}
apply plugin: 'org.moallemi.advanced-build-version'
apply plugin: "com.github.ben-manes.versions"
advancedVersioning {
outputOptions {
renameOutput true
nameFormat '${projectName}-${versionCode}'
}
}
私がやりたいすべてが(長い)現在の日付にversionCodeを設定することです。 どうすればいいですか?それは正しい方向ですか?
ありがとうございます!
あなたは '$ {プロジェクト名} - ' 'てみました' +システム。 currentTimeMillis(); ? – Blackbelt