我有一个安装了两种风格的android项目。如何通过具有特定风味的Jenkins进行构建? 这是我在build.graddle中的风格:
productFlavors{
flavour 1 {
applicationId "app_id"
resValue "string", "app_name", "Flavour 1 app name"
.......
}
flavour 2 {
applicationId "app_id2"
resValue "string", "app_name", "Flavour 2 app name"
.......
}
}
提前谢谢!
答案 0 :(得分:6)
您的任务目前告诉gradle对所有发布版本进行干净构建:
facebookExample.controller('carteController', function($scope, $ionicLoading,$cordovaGeolocation,$compile) {
function initialize() {
console.log("fonction googleMap");
var myLatlng = new google.maps.LatLng(43.07493,-89.381388);
var mapOptions = {
center: myLatlng,
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"),
mapOptions);
//Marker + infowindow + angularjs compiled ng-click
var contentString = "<div><a ng-click='clickTest()'>Click me!</a></div>";
var compiled = $compile(contentString)($scope);
var infowindow = new google.maps.InfoWindow({
content: compiled[0]
});
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Uluru (Ayers Rock)'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
$scope.map = map;
}
// google.maps.event.addDomListener(window, 'load', initialize);
$scope.centerOnMe = function() {
if(!$scope.map) {
return;
}
$scope.loading = $ionicLoading.show({
content: 'Getting current location...',
showBackdrop: false
});
navigator.geolocation.getCurrentPosition(function(pos) {
$scope.map.setCenter(new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude));
$scope.loading.hide();
}, function(error) {
alert('Unable to get location: ' + error.message);
});
};
$scope.clickTest = function() {
alert('Example of infowindow with ng-click')
};
});
您可以使用下面的代码更改此选项以仅构建一种风味。有关详细信息,请参阅Gradle User Guide。
clean build assembleRelease