History of sexual minorities in Sri Lanka
The history of sexual minorities in Sri Lanka covered in this article dates back to a couple of centuries before the start of the Vikram Samvat era (300 BCE), although it is highly likely that archaeology predating this period exists. There are virtually zero historical records of sexual minorities in the Latin script dating prior to colonialism. The concept of Sri Lanka did not exist prior to colonialism, and the term 'lanka' translates to 'island'. Lanka (Pre-Colonialism) 
The traditional legal codes of Lanka did not criminalise, or actively discriminate against, sexual minorities. It is believed that gender stereotypes were less important and more blurred during this era., with sexuality being more expressive (sexual sculptures similar to those found at Hindu temples in India can be found on temples in Sri Lanka). Hinduism 
The concept of sexual minorities was widely known in the prevailing Hindu culture by the time Gautama Buddha founded his philosophies. The monastic disciplines of the island explicitly contained homosexual sex alongside a variety of prohibitions against heterosexual sex, and it explicitly stated that these rules were only to be applied to monks, and not the common people. It is notable that masturbation is not considered a serious offense by the order. A sexual non-conformist is stated as being Pandaka. These people were discriminated against in the sense that they were not allowed to be ordained as a monk. It has been thought that these people are hermaphrodites or eunuchs, though a modern concept found on the island called nachchis might also be the best translation - referring to effeminate homosexuals who engage in sex work. Buddhism 
Sri Lanka has the longest unbroken history of adhering to Buddhism. In the 5th century of the Christian calendar, the monk Buddhaghosa attempted to explain Pandakas in his scriptures, to the Buddhist lay people. Other records simply stay silent on the subject. For example, the Upāsakajanalankara, a guide for common people written in the 14th century of the Christian calendar discusses sexual misconduct in depth but makes no mention of homosexual sex. A number of same-sex relationships were discussed in a variety of poems and literature, such as the literature of Culavamsa; however, these do not venture into deep eroticism and can also be viewed as a very intense "bromance". The Buddhism followed in Sri Lanka does not hold the view that sexual minorities would have been discriminated through the philosophies forwarded by the Buddha. Homosexuality is not specifically targeted in the Buddhist scriptures that are followed on the island and it is thought that this is because Buddhism did not view homosexuality as a topic of concern. The Tripitaka does, however, contain passing references to homosexuality and transsexuality. For example, homosexuality is found in a case of a monk, called Wakkali, who became a monk due to his intense attraction towards Buddha, or transsexuality in a case of a man who converted to a woman and married another man. We also find a case where a novice monk masturbated to a high ordained monk. Buddhism in Sri Lanka mostly focuses on sex on a non-discriminatory basis. It holds the view that sex and sexual thoughts are a hindrance in general to follow the path towards Nibbhana, pre-marital sex is considered immoral. However, it does accept post-marital sex and considers it as an obligation between married couples. This is reflected in modern-day discussion about sex, including discussion on same-sex relations. The monastic rules state that monks should be celibate, but note that these rules do not extend to the lay people. Ground views shares the opinion that Sri Lanka without colonial influences would have probably held a similar culture to that of Thailand. Ceylon (Colonialism)

Christianity 
With the colonial expansion of European empires to the island, also came missionaries from the European church. Dutch traveler Johan Stavorinus reported that male homosexuality "is not only universal in practice among them, but extends to a bestial communication with brutes, and in particular with sheep". An observer in the 16th century, most likely a priest from the European church of ethnic European descent, claimed that “the sin of sodomy is so prevalent... that it makes us very afraid to live there. And if one of the principle men of the kingdom is questioned about if they are not ashamed to do such a thing as ugly and dirty, to this they respond that they do everything that they see the king doing, because that is the custom among them.”

Englishman John Knox, who by this time had lived in the country for twenty years, wrote about the King of Kandy: “Most of his Attendants are Boyes, and Young Men, that are well favoured, and of good Parentage. For the supplying himself with these, he gives order to his Dissava's or Governors of the countries to pick and choose out Boyes, that are comely and of good Descent, and send them to the Court. These boyes go bare-headed with long hair hanging down their backs." Article 365 

Article 365 of the Penal Code criminalised homosexual sex between two men. Despite the  criminalisation of homosexual sex, the island remained largely free of witch-hunts or programs against LGBT, and was often considered to be a safe haven for Europeans fleeing homophobia back home; it is thought that the natives' views of homosexuality from Hinduism/Buddhism initially helped restrain homophobia to lower levels. Sri Lanka (Post-Colonialism) 
Regardless of their sexuality, the men are expected to marry women in adulthood. Lesbian Sex Criminalized 
Same-sex relations between two women were outlawed in 1995. Constitutional Affairs Minister G. L. Peiris at the time was trying to decriminalise homosexual relations between two men, but members of the parliament revolted against the proposal and, after realising that lesbians were not covered under the existing law, voted to expand the law to cover women as well. The law states that lesbian sex is punishable by up to twelve years in prison. The media at the time was mostly supportive of motions to support the lesbian community on the island according to Chinese news outlet, South China Morning Post. This is however conflicted by a news report from the UK's BBC which stated that the Sri Lanka Press Council set aside a complaint against a homophobic letter published in a leading newspaper, stating that lesbianism was an "act of sadism". The island's LGBT community would meet up annually at a resort to celebrate homosexuality. The rampant problem of child sex abuse in the Sangha is widely known, but many observers do not find evidence for it. The Middle Path 
The ethnic conflict on the island is often cited as a major reason why legal rights for sexual minorities did not progress with the same speed as other countries. Often, political parties that focused on moderation and the "middle path", emphasising the needs for human rights, would be sidelined in favour of political parties that supported extremist and nationalist politics. The European Union has recently proposed to use its elevated trade deal negotiations to ensure that human rights on the island would be protected. In November 2016, Sri Lanka voted against a plan to get rid of the UN Independent Expert on violence and discrimination based on sexual orientation and gender identity at the United Nations General Assembly. The push to get rid of the [UN] expert failed 84-77. Sri Lanka along with Kiribati were the only two countries, where homosexuality is still criminalised, who voted against the proposal. The conservative government later announced that the Constitution of Sri Lanka bans discrimination based on sexual orientation. It also updated its human rights action plan to advance further rights for LGBT. It was consequently followed by an announcement from the Supreme Court of Sri Lanka that it would not be able to enforce the criminal law Section 365A if a case was brought before it. In January 2017, cabinet members of the Sri Lankan Government rejected the chance to legalise homosexuality. But in November, Deputy Solicitor General Nerin Pulle stated that the government would move to decriminalise same-sex sexual activity. Timeline

Lanka

Ceylon

Sri Lanka

