Under the special rules applicable to divorced or separated parents, The noncustodial parent is be treated as providing more than half of the child's support if a decree or agreement went into effect after 1984 and states the noncustodial parent can claim the child as a dependent without regard to any condition, such as payment of support. This sounds like your situation; therefore, your ex is entitled to the exemption.
However, you do qualify for the child care credit under the following rules:
Child of Divorced or Separated Parents
To be a qualifying person, your child usually must be your dependent for whom you can claim an exemption. But an exception may apply if you are divorced or separated. Under the exception, if you are the custodial parent, you can treat your child as a qualifying person even if you cannot claim the child's exemption. If you are the noncustodial parent, you cannot treat your child as a qualifying person even if you can claim the child's exemption.
This exception applies if all of the following are true.
1) One or both parents had custody of the child for more than half of the year.
2) One or both parents provided more than half of the child's support for the year.
3) Either-
a) The custodial parent signed Form 8332, Release of Claim to Exemption for Child of Divorced or Separated Parents, or a similar statement, agreeing not to claim the child's exemption for the year, or
b) The noncustodial parent provided at least $600 for the child's support and can claim the child's exemption under a pre-1985 decree of divorce or separate maintenance, or written agreement.
For purposes of 3(a), a similar statement includes a divorce decree or separation agreement that went into effect after 1984 that allows the noncustodial parent to claim the child's exemption without any conditions, such as payment of support.