|
@ -18,7 +18,7 @@ def getVersionCode = { -> |
|
|
|
|
|
|
|
|
def getVersionName = { -> |
|
|
def getVersionName = { -> |
|
|
def ver = 'v0.5.2' |
|
|
def ver = 'v0.5.2' |
|
|
return ver |
|
|
return ver; |
|
|
try { |
|
|
try { |
|
|
def stdout = new ByteArrayOutputStream() |
|
|
def stdout = new ByteArrayOutputStream() |
|
|
exec { |
|
|
exec { |
|
@ -28,7 +28,7 @@ def getVersionName = { -> |
|
|
return stdout.toString().trim() |
|
|
return stdout.toString().trim() |
|
|
} |
|
|
} |
|
|
catch (ignored) { |
|
|
catch (ignored) { |
|
|
return null |
|
|
return null; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -49,7 +49,7 @@ def getEnvOrConsole = { env, prompt -> |
|
|
|
|
|
|
|
|
android { |
|
|
android { |
|
|
compileSdkVersion 25 |
|
|
compileSdkVersion 25 |
|
|
buildToolsVersion '25.0.0' |
|
|
buildToolsVersion '27.0.3' |
|
|
defaultConfig { |
|
|
defaultConfig { |
|
|
applicationId "wang.switchy.hin2n" |
|
|
applicationId "wang.switchy.hin2n" |
|
|
minSdkVersion 14 |
|
|
minSdkVersion 14 |
|
@ -73,9 +73,9 @@ android { |
|
|
|
|
|
|
|
|
release { |
|
|
release { |
|
|
storeFile file("Hin2n.jks") |
|
|
storeFile file("Hin2n.jks") |
|
|
storePassword getEnvOrConsole("HIN2N_KSTOREPWD", "Keystore password") |
|
|
storePassword "yourpassword" |
|
|
keyAlias "Hin2n" |
|
|
keyAlias "Hin2nalias" |
|
|
keyPassword getEnvOrConsole("HIN2N_KEYPWD", "Key password") |
|
|
keyPassword "yourpassword" |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -97,7 +97,7 @@ android { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
applicationVariants.all { variant -> |
|
|
applicationVariants.all { variant -> |
|
|
variant.outputs.each { output -> |
|
|
variant.outputs.all { output -> |
|
|
def outputFile = output.outputFile |
|
|
def outputFile = output.outputFile |
|
|
def fileName = null |
|
|
def fileName = null |
|
|
if (outputFile != null && outputFile.name.endsWith('.apk')) { |
|
|
if (outputFile != null && outputFile.name.endsWith('.apk')) { |
|
@ -105,7 +105,7 @@ android { |
|
|
def channel = variant.mergedFlavor.manifestPlaceholders.CHANNEL_VALUE |
|
|
def channel = variant.mergedFlavor.manifestPlaceholders.CHANNEL_VALUE |
|
|
def arch = variant.mergedFlavor.manifestPlaceholders.ARCH |
|
|
def arch = variant.mergedFlavor.manifestPlaceholders.ARCH |
|
|
fileName = "hin2n_${variant.mergedFlavor.versionName}_${channel}_${arch}_${variant.buildType.name}.apk" |
|
|
fileName = "hin2n_${variant.mergedFlavor.versionName}_${channel}_${arch}_${variant.buildType.name}.apk" |
|
|
output.outputFile = new File(output.outputFile.parent, fileName) |
|
|
outputFileName = fileName |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -133,11 +133,7 @@ android { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
externalNativeBuild { |
|
|
|
|
|
cmake { |
|
|
|
|
|
path "CMakeLists.txt" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
greendao { |
|
|
greendao { |
|
@ -147,14 +143,14 @@ greendao { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
dependencies { |
|
|
dependencies { |
|
|
compile fileTree(include: ['*.jar'], dir: 'libs') |
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs') |
|
|
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { |
|
|
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { |
|
|
exclude group: 'com.android.support', module: 'support-annotations' |
|
|
exclude group: 'com.android.support', module: 'support-annotations' |
|
|
}) |
|
|
}) |
|
|
compile 'com.android.support:design:25.2.0' |
|
|
implementation 'com.android.support:design:25.4.0' |
|
|
testCompile 'junit:junit:4.12' |
|
|
testImplementation 'junit:junit:4.12' |
|
|
compile 'com.android.support:appcompat-v7:25.+' |
|
|
implementation 'com.android.support:appcompat-v7:25.+' |
|
|
compile 'org.greenrobot:eventbus:3.1.1' |
|
|
implementation 'org.greenrobot:eventbus:3.1.1' |
|
|
|
|
|
|
|
|
compile 'org.greenrobot:greendao:3.2.0' |
|
|
implementation 'org.greenrobot:greendao:3.2.0' |
|
|
} |
|
|
} |
|
|