TOKYO, Dec 27 (Reuters) - Japan's Nikkei stock average eked out a slight gain on Friday, logging its highest close in six years, although Takeda Pharmaceutical Co Ltd took a beating after it ended development of a treatment for diabetes. The Nikkei ended 4.5 points higher at 16,178.94 in its eight straight day of gains, its longest such streak since March. Takeda suffered its worst one-day decline in seven months, down 5.2 percent after the drugmaker said it had decided voluntarily to end development activities for fasiglifam, an investigational treatment for type two diabetes, due to concerns over liver safety. The broader Topix index gained 0.8 percent to 1,290.07, with 2.65 billion shares changing hands, slightly behind a four-day high of 2.66 billion shares set on Thursday. Buoyed by Japan's aggressive fiscal and monetary stimulus, the benchmark Nikkei has rallied 55.6 percent, heading for its best annual performance since 1972.