From 2a01ef5e49422cca49bc7476fc1b8be8c8556561 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期四, 08 九月 2022 10:46:57 +0800 Subject: [PATCH] 最新sdk java版本 --- HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java | 268 ++++++++++++++++++++++++++--------------------------- 1 files changed, 131 insertions(+), 137 deletions(-) diff --git a/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java b/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java index 0c7d606..c769935 100644 --- a/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java +++ b/HDLSDK/app/src/main/java/com/hdl/hdlsdk/MainActivity.java @@ -3,13 +3,14 @@ import androidx.activity.result.ActivityResultCallback; import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts; -import androidx.annotation.NonNull; + +import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.Manifest; -import android.content.Intent; +import android.os.Build; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; @@ -19,32 +20,26 @@ import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.listener.OnItemClickListener; -import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; -import com.hdl.hdlsdk.device.DevicesListActivity; -import com.hdl.sdk.common.config.TopicConstant; -import com.hdl.sdk.common.event.EventListener; -import com.hdl.sdk.common.exception.HDLLinkException; -import com.hdl.sdk.common.utils.IdUtils; -import com.hdl.sdk.common.utils.IpUtils; -import com.hdl.sdk.common.utils.gson.GsonConvert; -import com.hdl.sdk.connect.HDLLink; -import com.hdl.sdk.connect.bean.LinkRequest; -import com.hdl.sdk.connect.bean.LinkResponse; -import com.hdl.sdk.connect.bean.request.AuthenticateRequest; -import com.hdl.sdk.connect.bean.request.PropertyReadRequest; -import com.hdl.sdk.connect.bean.response.BaseLocalResponse; -import com.hdl.sdk.connect.bean.response.GatewaySearchBean; -import com.hdl.sdk.connect.callback.HDLLinkCallBack; -import com.hdl.sdk.connect.callback.HDLLinkResponseCallBack; -import com.hdl.sdk.connect.config.HDLLinkConfig; -import com.hdl.sdk.connect.socket.HDLAuthSocket; -import com.hdl.sdk.connect.socket.HDLSocket; -import com.hdl.sdk.connect.bean.request.DeviceControlRequest; -import com.hdl.sdk.connect.protocol.LinkMessageDecoder; -import com.hdl.sdk.connect.protocol.LinkMessageEncoder; -import com.hdl.sdk.socket.SocketOptions; -import com.hdl.sdk.socket.codec.MessagePipeLine; +import com.hdl.sdk.link.HDLLinkLocalSdk; +import com.hdl.sdk.link.bean.LinkFunctionBean; +import com.hdl.sdk.link.bean.LinkSceneBean; +import com.hdl.sdk.link.common.config.TopicConstant; +import com.hdl.sdk.link.common.event.EventListener; +import com.hdl.sdk.link.common.exception.HDLLinkException; +import com.hdl.sdk.link.common.utils.IdUtils; +import com.hdl.sdk.link.common.utils.gson.GsonConvert; +import com.hdl.sdk.link.core.bean.LinkResponse; +import com.hdl.sdk.link.core.bean.request.AuthenticateRequest; +import com.hdl.sdk.link.core.bean.request.DeviceControlRequest; +import com.hdl.sdk.link.core.bean.response.BaseLocalResponse; +import com.hdl.sdk.link.core.bean.response.GatewaySearchBean; +import com.hdl.sdk.link.core.callback.HDLLinkCallBack; +import com.hdl.sdk.link.core.callback.HDLLinkResponseCallBack; +import com.hdl.sdk.link.core.callback.HDLLinkTCallBack; +import com.hdl.sdk.link.core.config.HDLLinkConfig; +import com.hdl.sdk.link.core.connect.HDLUdpConnect; + import java.io.UnsupportedEncodingException; import java.security.MessageDigest; @@ -52,8 +47,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; - -import static com.hdl.sdk.common.config.TopicConstant.GATEWAY_SEARCH_REPLY; public class MainActivity extends AppCompatActivity { @@ -64,7 +57,7 @@ private TextView responseTv; boolean isOn; private EventListener allTopicsListener; - private String testLightSid = "0001010D48C71B02020100010101"; + private String testLightSid = "1493092497588469761"; @Override protected void onDestroy() { @@ -72,18 +65,31 @@ removeAllTopicsListener(); } + /** + * 鍒濆鍖朒DLSDK + */ + void initHDLSDK() { + HDLLinkLocalSdk.getInstance().init("1530018255883706369","735c1677504a7034"); + } + + /** + * 涓夋柟璁惧闆嗘垚鍒癏DL鏃讹紝闇�瑕佸垵濮嬪寲鐨勪俊鎭� + */ + void initThird(){ + initDeviceInfo();//鍒濆鍖栧熀鏈俊鎭紝闈炲父閲嶈锛岃璇佹椂瑕佺敤 + checkIfCertified();//妫�娴嬫槸鍚﹀凡缁忚璇佷簡锛岀敤浜庡垽鏂� + } + + @RequiresApi(api = Build.VERSION_CODES.O) @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - responseTv = findViewById(R.id.response_tv); - tv = findViewById(R.id.state_tv); - rv = findViewById(R.id.rv); - rv.setLayoutManager(new LinearLayoutManager(this)); - checkIfCertified(); - initDeviceInfo(); - registerAllTopicsListener(); + initView(); + initHDLSDK();//杩欐姣旇緝閲嶈锛屽湪浣跨敤鍓嶈璁剧疆濂藉綋鍓嶇綉鍏矷d鍙婂姞瑙e瘑閽� +// initThird();//涓夋柟璁惧闆嗘垚鏃惰鍒濆鍖� + registerAllTopicsListener();//娉ㄥ唽鐩戝惉鎺ユ敹鎵�鏈変富棰樼殑鏁版嵁 ActivityResultLauncher<String[]> launcher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), new ActivityResultCallback<Map<String, Boolean>>() { @Override @@ -91,7 +97,7 @@ } }); - + //鍒濆鍖栧畨鍗撴潈闄� launcher.launch(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}); final List<DemoBean> beans = new ArrayList<>(); @@ -112,15 +118,9 @@ rv.setAdapter(demoAdapter); -// final SocketOptions options = new SocketOptions(); -// -// MessagePipeLine pipeLine = new MessagePipeLine(); -// options.setHandleMessage(pipeLine); -// options.setEnabledHeartbeat(false); - demoAdapter.setOnItemClickListener(new OnItemClickListener() { @Override - public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) { + public void onItemClick(BaseQuickAdapter<?, ?> adapter, View view, int position) { switch (position) { case 0: //鍏ョ綉璁よ瘉 @@ -156,7 +156,7 @@ break; case 8: //鍔熻兘鍒楄〃 - startDevicesListActivity(); +// startDevicesListActivity(); break; case 9: //UDP鍙戦�� @@ -178,6 +178,13 @@ } }); } + //鍒濆鍖栨帶浠� + void initView(){ + responseTv = findViewById(R.id.response_tv); + tv = findViewById(R.id.state_tv); + rv = findViewById(R.id.rv); + rv.setLayoutManager(new LinearLayoutManager(this)); + } public void showToast(String text) { @@ -188,7 +195,7 @@ * 妫�娴嬫槸鍚﹁璇佽繃 */ void checkIfCertified() { - boolean isCertified = HDLLink.getInstance().checkIfCertified(); + boolean isCertified = HDLLinkLocalSdk.getInstance().checkIfCertified(); String mes = isCertified ? "宸茬粡璁よ瘉杩�" : "鏈璇�"; showToast(mes); tv.setText(mes); @@ -205,7 +212,7 @@ handleLinkResponse(response); } }; - HDLLink.getInstance().registerAllTopicsListener(allTopicsListener); + HDLLinkLocalSdk.getInstance().registerAllTopicsListener(allTopicsListener); } /** @@ -226,7 +233,6 @@ } } else { //鍏跺畠涓婚 - } } @@ -248,25 +254,26 @@ * 绉婚櫎鎵�鏈変富棰樻暟鎹殑鐩戝惉 */ void removeAllTopicsListener() { - HDLLink.getInstance().removeAllTopicsListener(allTopicsListener); + HDLLinkLocalSdk.getInstance().removeAllTopicsListener(allTopicsListener); } - void initDeviceInfo() - { + void initDeviceInfo() { AuthenticateRequest.AuthenticateDeviceInfoBean infoBean = new AuthenticateRequest.AuthenticateDeviceInfoBean(); - infoBean.setDeviceMAC("123456789"); - infoBean.setIPMAC("12345678900"); + infoBean.setDeviceMAC("AA00000000000100"); + infoBean.setIPMAC("AA00000000000100"); infoBean.setDeviceName("闊充箰鎾斁鍣�");//璁惧鍚嶅瓧 infoBean.setDeviceModel("MCLog.431");//璁惧鍨嬪彿 infoBean.setAccessMode("WIFI"); - infoBean.setIPGateway("192.168.88.1"); - infoBean.setIPAddress("192.168.88.100"); + infoBean.setIPGateway("192.168.1.1"); + infoBean.setIPAddress("192.168.1.116"); infoBean.setGateway_type("music.standard"); infoBean.setHw_version("HW2.0"); infoBean.setFw_version("Fw1.0"); - infoBean.setOID("010105000000FE08"); - infoBean.setSid("010105000000FE08110100000000"); + infoBean.setOID("010105000000FE11");//姣忎釜璁惧oid閮借涓嶄竴鏍� + infoBean.setSid("110105000000FE08110100000011");//姣忎釜璁惧鐨剆id閮借涓嶄竴鏍� HDLLinkConfig.getInstance().setDeviceInfoBean(infoBean); + + } /** @@ -276,59 +283,46 @@ tv.setText("寮�濮嬪叆缃戣璇�..."); //璁よ瘉鎻愪氦鍙傛暟鍑嗗 - //娴嬭瘯鏈嶅姟 - String spkStr = "ir.module";//浜у搧spk - String macStr = "AA000000000000BB";//璁惧鍞竴MAC鍦板潃 - String secret = "87ae414b7a853f65";//閫氳繃spk鍜宮ac鎻愪氦浜戠璁よ瘉鍚庡垎閰嶇殑secret +// 娴嬭瘯鏈嶅姟 +// String spkStr = "ir.module";//浜у搧spk +// String macStr = "AA000000000000AF";//璁惧鍞竴MAC鍦板潃 +// String secret = "44b360eb74b7ba64";//閫氳繃spk鍜宮ac鎻愪氦浜戠璁よ瘉鍚庡垎閰嶇殑secret - //姝e紡鏈嶅姟鍣� -// String spkStr = "screen.mirror";//浜у搧spk -// String macStr = "AA000000000000AC";//璁惧鍞竴MAC鍦板潃 -// String secret = "ee62124c151b737c";//閫氳繃spk鍜宮ac鎻愪氦浜戠璁よ瘉鍚庡垎閰嶇殑secret +// 姝e紡鏈嶅姟鍣� + String spkStr = "screen.mirror";//浜у搧spk + String macStr = "AA00000000000100";//璁惧鍞竴MAC鍦板潃 + String secret = "e186beeb7974998e";//閫氳繃spk鍜宮ac鎻愪氦浜戠璁よ瘉鍚庡垎閰嶇殑secret String mac_key = stringToMD5(stringToMD5(macStr + secret)); String versionString = "HDL_V1.0.1";// String time = String.valueOf(System.currentTimeMillis()); + HDLLinkConfig.getInstance().getDeviceInfoBean().setDeviceMAC(macStr); //1.璁剧疆璁よ瘉淇℃伅 AuthenticateRequest.RequestBean requestBean = new AuthenticateRequest.RequestBean(); requestBean.setMAC(macStr); - requestBean.setSupplier("raysgem"); + requestBean.setSupplier("WISE"); requestBean.setFirmwareVersion(versionString); requestBean.setHardwareModel("1956F"); AuthenticateRequest.AuthBean authbean = new AuthenticateRequest.AuthBean(); authbean.setSpk(spkStr); authbean.setMACKey(mac_key); authbean.setRequest(requestBean); - - //2.璁剧疆璁惧淇℃伅 - AuthenticateRequest.AuthenticateDeviceInfoBean infoBean = new AuthenticateRequest.AuthenticateDeviceInfoBean(); - infoBean.setDeviceMAC(macStr); - infoBean.setIPMAC(macStr); - infoBean.setDeviceName("绾㈠瀹�");//璁惧鍚嶅瓧 - infoBean.setDeviceModel("HDL");// - infoBean.setAccessMode("WIFI"); - infoBean.setIPGateway("192.168.88.1"); - infoBean.setIPAddress(IpUtils.getIP(this)); - - infoBean.setOID("010105000000FE08"); - infoBean.setSid("010105000000FE08110100000000"); -// infoBean.set - AuthenticateRequest.VersionBean[] versionBeans = new AuthenticateRequest.VersionBean[]{new AuthenticateRequest.VersionBean("FW", versionString), new AuthenticateRequest.VersionBean("HW", "1956F")}; - infoBean.setVersions(versionBeans); - AuthenticateRequest request = new AuthenticateRequest(IdUtils.getUUId(), time, infoBean, authbean); - HDLLink.getInstance().startAuthenticateRequest(request, new HDLLinkCallBack() { + //HDLLinkConfig.getInstance().getDeviceInfoBean()杩欎釜鍒濆鍖栫殑鏃跺�欒鍏堣缃ソ + AuthenticateRequest request = new AuthenticateRequest(IdUtils.getUUId(), time, HDLLinkConfig.getInstance().getDeviceInfoBean(), authbean); + HDLLinkLocalSdk.getInstance().startAuthenticateRequest(request, new HDLLinkCallBack() { @Override public void onError(HDLLinkException e) { - tv.setText("璁よ瘉澶辫触"); - responseTv.setText(e.getMsg()); - Log.i("TAG", "onError: 璁よ瘉澶辫触"); +// tv.setText("璁よ瘉澶辫触"); +// responseTv.setText(e.getMsg()); + Log.i("TAG", "onError: 璁よ瘉澶辫触" + e.getMsg()); } @Override public void onSuccess(String msg) { - tv.setText("璁よ瘉鎴愬姛"); - responseTv.setText(msg.toString()); +// tv.setText("璁よ瘉鎴愬姛"); +// responseTv.setText(msg.toString()); + Log.i("TAG", "onSuccess: 璁よ瘉鎴愬姛" + msg.toString()); } }); } @@ -361,18 +355,14 @@ */ void searchGatewayBroadcast() { tv.setText("鎼滅储缃戝叧涓�..."); - HDLLink.getInstance().searchGatewayBroadcast(new HDLAuthSocket.SearchGatewayCallBack() { + HDLLinkLocalSdk.getInstance().searchGatewayBroadcast(new HDLUdpConnect.SearchGatewayCallBack() { @Override - public void onError(HDLLinkException e) { - tv.setText("缃戝叧涓嶅湪绾�"); - responseTv.setText(e.getMsg()); + public void onSuccess(GatewaySearchBean gatewaySearchBean) { } @Override - public void onSuccess(GatewaySearchBean gatewaySearchBean) { - tv.setText("缃戝叧鍦ㄧ嚎"); - responseTv.setText("鎼滅储鎴愬姛 缃戝叧id锛�" + gatewaySearchBean.getGatewayId()); -// LogUtils.i("TAG", "onSuccess: 鎼滅储鎴愬姛锛�"+gatewaySearchBean.getGatewayId()); + public void onError(HDLLinkException e) { + } }); } @@ -383,16 +373,15 @@ void getFunctionList() { tv.setText("鑾峰彇鍔熻兘鍒楄〃涓�..."); responseTv.setText(""); - HDLLink.getInstance().getFunctionList(new HDLLinkCallBack() { + HDLLinkLocalSdk.getInstance().getFunctionList(new HDLLinkTCallBack<List<LinkFunctionBean>>() { @Override - public void onError(HDLLinkException error) { - tv.setText(error.getMsg()); + public void onSuccess(List<LinkFunctionBean> data) { + } @Override - public void onSuccess(String data) { - tv.setText("鑾峰彇鍔熻兘鍒楄〃鎴愬姛"); - responseTv.setText(data); + public void onError(HDLLinkException e) { + } }); } @@ -405,15 +394,16 @@ tv.setText("鍔熻兘灞炴�ц鍙�"); List<String> sids = new ArrayList<>(); sids.add(testLightSid); - HDLLink.getInstance().getFunctionAttribute(sids, new HDLLinkCallBack() { + + HDLLinkLocalSdk.getInstance().getFunctionAttribute(sids, new HDLLinkTCallBack<List<LinkFunctionBean>>() { @Override - public void onSuccess(String msg) { - responseTv.setText(msg); + public void onSuccess(List<LinkFunctionBean> data) { + } @Override public void onError(HDLLinkException e) { - responseTv.setText(e.getMsg()); + } }); } @@ -426,23 +416,21 @@ tv.setText("璇诲彇鐘舵�佷腑..."); List<String> list = new ArrayList<>(); list.add(testLightSid);//瑕佽鍙栬澶囩殑sid - HDLLink.getInstance().propertyRead(list, new HDLLinkCallBack() { + HDLLinkLocalSdk.getInstance().propertyRead(list, new HDLLinkCallBack() { @Override - public void onSuccess(String data) { - tv.setText("璇诲彇鎴愬姛"); - responseTv.setText(data); + public void onSuccess(String msg) { + } @Override public void onError(HDLLinkException e) { - tv.setText("璇诲彇澶辫触"); - responseTv.setText(e.getMsg()); + } }); } /** - * 鎺у埗澶辫触 + * 鎺у埗璁惧 * 鍥炲鍝嶅簲code涓�200 浠h〃鎵ц鎴愬姛 */ void controlDecide() { @@ -458,15 +446,17 @@ statusBeanList.add(bean); request.setStatus(statusBeanList); requestList.add(request); - HDLLink.getInstance().propertyDown(requestList, new HDLLinkCallBack() { + HDLLinkLocalSdk.getInstance().propertyDown(requestList, new HDLLinkCallBack() { @Override public void onSuccess(String data) { - responseTv.setText(data); +// responseTv.setText(data); + Log.i("TAG", "onSuccess 鎺у埗璁惧鎴愬姛" + data.toString()); } @Override public void onError(HDLLinkException e) { - responseTv.setText(e.getMsg()); +// responseTv.setText(e.getMsg()); + Log.i("TAG", "onError 鎺у埗璁惧澶辫触" + e.getMsg()); } }); } @@ -476,15 +466,15 @@ */ void getSceneList() { tv.setText("璇诲彇鍦烘櫙鍒楄〃"); - HDLLink.getInstance().getSceneList(new HDLLinkCallBack() { + HDLLinkLocalSdk.getInstance().getSceneList(new HDLLinkTCallBack<List<LinkSceneBean>>() { @Override - public void onSuccess(String msg) { - responseTv.setText(msg); + public void onSuccess(List<LinkSceneBean> data) { + } @Override public void onError(HDLLinkException e) { - responseTv.setText(e.getMsg()); + } }); } @@ -506,24 +496,26 @@ } else { sids.add("04010560D2C76E0A0A0100010000"); } - HDLLink.getInstance().controlScene(sids, new HDLLinkCallBack() { + HDLLinkLocalSdk.getInstance().controlScene(sids, new HDLLinkCallBack() { @Override public void onSuccess(String msg) { - responseTv.setText(msg); +// responseTv.setText(msg); + Log.i("TAG", "onSuccess 鍦烘櫙鎺у埗鎴愬姛" + msg.toString()); } @Override public void onError(HDLLinkException e) { - responseTv.setText(e.getMsg()); +// responseTv.setText(e.getMsg()); + Log.i("TAG", "onError 鍦烘櫙鎺у埗澶辫触" + e.getMsg()); } }); } - void startDevicesListActivity() { +/* void startDevicesListActivity() { Intent intent = new Intent(this, DevicesListActivity.class); startActivity(intent); - } + }*/ /** * TCP鍙戦�� 鍙彂涓�娆★紝涓嶇洃鍚洖澶嶏紝涓嶉噸鍙� @@ -532,7 +524,7 @@ tv.setText("TCP鍙戦�� 鍙彂涓�娆★紝涓嶇洃鍚洖澶嶏紝涓嶉噸鍙�"); String propertyDownTopic = String.format(TopicConstant.PROPERTY_DOWN, HDLLinkConfig.getInstance().getGatewayId()); String bodyStr = getPropertyDownBodyStr(); - HDLLink.getInstance().tcpSendMsg(propertyDownTopic, bodyStr); + HDLLinkLocalSdk.getInstance().tcpSendMsg(propertyDownTopic, bodyStr); } /** @@ -542,7 +534,7 @@ tv.setText("UDP鍙戦�� 鍙彂涓�娆★紝涓嶇洃鍚洖澶嶏紝涓嶉噸鍙�"); String propertyDownTopic = String.format(TopicConstant.PROPERTY_DOWN, HDLLinkConfig.getInstance().getGatewayId()); String bodyStr = getPropertyDownBodyStr(); - HDLLink.getInstance().udpSendMsg(propertyDownTopic, bodyStr); + HDLLinkLocalSdk.getInstance().udpSendMsg(propertyDownTopic, bodyStr,null); } private String getPropertyDownBodyStr() { @@ -574,16 +566,17 @@ tv.setText("UDP鍙戦�侊紝鐩戝惉涓婚鍥炲锛屽甫閲嶅彂甯﹀洖璋�"); String propertyDownTopic = String.format(TopicConstant.PROPERTY_DOWN, HDLLinkConfig.getInstance().getGatewayId()); String bodyStr = getPropertyDownBodyStr(); - HDLLink.getInstance().udpSendMsg(propertyDownTopic, bodyStr, new HDLLinkResponseCallBack() { + HDLLinkLocalSdk.getInstance().udpSendMsg(propertyDownTopic, bodyStr, new HDLLinkResponseCallBack() { @Override public void onSuccess(LinkResponse msg) { - Log.i("udpSendWithCallback", "udpSendWithCallback"); - responseTv.setText(GsonConvert.getGson().toJson(msg)); + Log.i("TAG", "onSuccess UDP鍙戦�佹垚鍔�" + GsonConvert.getGson().toJson(msg)); +// responseTv.setText(GsonConvert.getGson().toJson(msg)); } @Override public void onError(HDLLinkException e) { - responseTv.setText(e.getMsg()); +// responseTv.setText(e.getMsg()); + Log.i("TAG", "onError UDP鍙戦�佸け璐�" + e.getMsg()); } }); } @@ -595,16 +588,17 @@ tv.setText("TCP鍙戦�侊紝鐩戝惉涓婚鍥炲锛屽甫閲嶅彂甯﹀洖璋�"); String propertyDownTopic = String.format(TopicConstant.PROPERTY_DOWN, HDLLinkConfig.getInstance().getGatewayId()); String bodyStr = getPropertyDownBodyStr(); - HDLLink.getInstance().tcpSendMsg(propertyDownTopic, bodyStr, new HDLLinkCallBack() { + HDLLinkLocalSdk.getInstance().tcpSendMsg(propertyDownTopic, bodyStr, new HDLLinkCallBack() { @Override public void onSuccess(String msg) { - Log.i("tcpSendWithCallback", "tcpSendWithCallback"); - responseTv.setText(msg); + Log.i("TAG", "onSuccess TCP鍙戦�佹垚鍔�" + msg); +// responseTv.setText(msg); } @Override public void onError(HDLLinkException e) { - responseTv.setText(e.getMsg()); +// responseTv.setText(e.getMsg()); + Log.i("TAG", "onError TCP鍙戦�佸け璐�"); } }); } -- Gitblit v1.8.0